github git

Good configurations

How to configure git for the first time use

Configure .gitconfigure file through following commands

For name : git config --global user.name "yourname" For email : git config --global user.name "youremail"

Commits can be pushed onto github through git push command

git push remote_name new_branch:branch_to_which_code_has_to_be_pushed

Concepts

Scenarios

How to rollback a commit without removing changes ?

Use git reset soft strategy while doing this not git reset hard Basically use the command in the following way

git reset  --soft  "commit_that_existed_before_my_commit"