Create new branch
git checkout -b <branch-name>
Reset modified files
git checkout HEAD -- <file-name> # specific file
git checkout HEAD -- . # all current modified
Rebase wit specific branch or commit
git rebase <branch-name>
git rebase -i <commit-id>
Add changes
git add <file-name>
git add .
Commit changes
git commit -m <message-content>
Add changes to latest commit
git commit --amend
git commit --amend --no-edit # no need to edit commit message
Show changes
git diff
git diff <file-name>
git diff HEAD~1 # compare with HEAD
git show <commit-id>
Rename branch
git branch -m <new-branch-name>
Delete remote branch
git push origin -d <branch-name>