Skip to content

Instantly share code, notes, and snippets.

@tonycn
Last active August 29, 2015 14:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tonycn/eeb147134dbedc2302e3 to your computer and use it in GitHub Desktop.
Save tonycn/eeb147134dbedc2302e3 to your computer and use it in GitHub Desktop.
git bugfix development
git tag -a v1.5.1
git push —tags origin HEAD
#新建branch继续开发
git checkout -b 1.5.1-bugfix
# 一些代码更改
git commit -a -m 'bugfix commit'
# commit : e1d3f…
git push origin 1.5.1-bugfix
#回到master,开发最新功能
git checkout master
git cherry-pick e1d3f… # 把bugfix的commit合并过来
git push origin master
一些原则:
尽量分开开发功能
尽早commit,和push
尽早pr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment