git init
git add . add current directory to stage
git add -A add all untrack directories and files to stage
git commit commit staged files
git checkout -b new-branch-name create new branch and checkout to new branch
git checkout existed-branch-name switch to existed branch
git stash reset working directory as latest commited status
git checkout -f force git to checkout HEAD
git push -u origin remote-branch-name
vim ~/.gitignore_global to add file type to be ignored by git globally
vim project_directory/.gitignore to add project specific file to be ignored by git
git merge branch-name to merge the branch-name into current HEAD
git diff to show difference of changes
git branch -d branch-to-be-deleted can delete the merged branch
git branch new-branch-name create new branch but HEAD remain in current branch