init config
$ git config --global user.name lazycece
$ git config --global user.email lazycece@gmail.com
$ git config --global color.ui auto
$ git config --global color.status auto
$ git config --global color.branch auto
$ git config --global color.diff auto
仓库相关
git remote add remote-branch-name remote-repository
git remote -v
git branch -vv
分支操作
git push --set-upstream origin new-branch-name
git branch new-branch-name
git branch -D master
git push origin --delete branch-name
git checkout branch-name
git checkout -b new-branch-name
git checkout -b new-branch-name origin/origin-branch-name
git fetch -p
stash 操作
git stash
git stash list
git statsh pop
git stash pop stash@{0}
git stash clear
git stash drop
merge 操作
git merge --no-ff branch-name
git fetch origin master
git diff local-branch oringin/master
git merge origin/master
git rebase origin/master
git reset merge
tag 操作
git tag
git tag tag-name
git tag -a tag-name -m "message"
git log --pretty=oneline --abbrev-commit
git tag tag-name commit-id
git show tag-name
git push origin tag-name
git push --tags
git tag -d tag-name
git push origin :refs/tags/tag-name