git config --global user.name "Your name"
git config --global user.email "Your email"
git init
git add "filename"
git commit -m "你对这次提交的说明"
git status
git log
git log --graph
git reflog
git reset --hard HEAD^ // 回到上次提交
git reset --hard HEAD^^ // 回到上上次提交
git reset --hard HEAD~100 // 回到前100次提交
git reset --hard xxxx // 回到版本号为xxxx的版本
git reset "file name" // 取消stage中的存储
git reset HEAD "file name"
git checkout xxxx
git checkout -b xxxx
git checkout -- "file name"
git remote add origin git@server-name.com:path/repo-name.git
git push -u origin "branch name"
git push origin "branch"
git pull
git branch "branch name"
git branch -d "branch name"
git merge "branch name"
git stash
git stash list
git stash apply
git stash drop
git stash pop