Unstage tracked files
$ git reset HEAD [file]Undo last commit (keeping changes)
$ git reset --soft HEAD^Resolve conflicts
- Go to the branch you want to merge with (master, for instance)
$ git checkout master- Pull changes from that branch
$ git pull- Go to the branch with conflicts and rebase it with master
$ git checkout [branch] && git rebase master- Resolve any conflict that shows up and add changes
$ git add .- Continue rebasing your branch
$ git rebase --continue- Repeat steps until you have no more files with conflicts and the rebase is finished.
Delete specified branch
$ git branch -d [branch-name]Rename current branch
$ git branch -m [new-branch-name]Check list of commits (oneline mode)
$ git log --onelineApply and remove changes stashed
$ git stash popInclude changes on last commit
$ git commit --amendSave git credentials
$ git config credential.helper storeReset local branch with remote branch
git reset --hard origin/masterUpdate local branch with remote
git fetch && git rebase origin/master