http://danielkummer.github.io/git-flow-cheatsheet/index.zh_CN.html
http://nvie.com/posts/a-successful-git-branching-model/
git branch [分支名]
git checkout [分支名]
git reset 版本号
git push origin master -f
或者
git push -f
git merge --no-ff <branch-name>
git checkout -b your_branch
git push <remote-name> <branch-name>
git branch -r
git branch -a
git pull origin other-branch
git fetch && git checkout other-branch
git branch -d <branch-name>
git push origin :<branch-name>
cat ~/.ssh/id_rsa.pub
将HTTPS修改为SSH(不要每次GIT PUSH都输入密码)
git remote set-url origin git@coding.net:xxx/yyy.git
git reset HEAD^
git commit --amend
$ git commit -m 'initial commit'
$ git add forgotten_file
$ git commit --amend
git submodule init
git submodule update
github commit 内容带上「 closes #23」 会自动关闭 ID 为23的 issues
最后欢迎大家再补充。
本文由 forecho 创作,采用 知识共享署名 3.0 中国大陆许可协议 进行许可。 可自由转载、引用,但需署名作者且注明文章出处。