基本操作
git status
git add .
git add <filename>
git commit -m'<comment>'
新建分支
git checkout -b <branch_name>
git push --set-upstream origin <branch_name>
切换分支
git checkout <branch_name>
本地追踪远端分支
git checkout -b <local_branch_name> origin/<remote_branch_name>
pull
git pull
git pull origin <remote_branch>:<local_branch>
pull remote,并使其覆盖本地原有的代码
git fetch
git reset --hard HEAD
git merge '@{u}'
删除分支
git branch -D <branch_name>
git push origin --delete <branch_name>
删除文件
git rm <filename>
git commit -m'<comment>'
其余操作
git diff
git checkout .