We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
先上图。
创建本地开发分支:
> git branch develop > git push -u origin develop
其他开发人员需克隆中央仓库 master ,并在本地建立开发分支,追踪该分支:
> git clone ssh://user@host/path/to/repo.git > git clone https://user@host/path/to/repo.git > git checkout -b develop origin/develop
基于 develop 分支创建开发新功能 feature 分支:
> git checkout - b feature-some develop
然后进行正常开发:
> git add * | git add -A > git commit -m "content of annotation" > git push
新功能开发完成:
# 为了保证本地的 feature-some 和 develop 分支均是最新的 > git pull origin develop # 切换 develop 分支 > git checkout develop > git merge feature-some > git push > git branch -d feature-some
使用新的分支进行发布准备工作:
> git checkout -b release-0.1 develop
这个分支是清理发布、执行所有测试、更新文档和其它为下个发布做准备操作的地方,像是一个专门用于改善发布的功能分支。
一旦准备好了发布,合并修改到 master 和 develop 分支上:
> git checkout master > git merge release-0.1 > git push > git checkout develop > git merge release-0.1 > git push > git branch -d release-0.1
发布分支是作为功能开发(develop分支)和对外发布(master分支)间的缓冲。只要有合并到 master 分支,就应该打好 tag 以方便跟踪:
> git tag -a 0.1 -m "Initial public release" master > git push --tags
基于 master 分支创建维护分支 hotfix,解决问题以后,合并回 master:
> git checkout -b hotfix-issue-#001 master # fix bugs # > git checkout master > git merge hotfix-issue-#001 > git push
同发布分支相同,维护分支中新加的重要修改也要推到 develop 分支中:
> git checkout develop > git merge issue-#001 > git push > git branch -d issue-#001
The text was updated successfully, but these errors were encountered:
No branches or pull requests
先上图。
1. 创建开发分支:
创建本地开发分支:
其他开发人员需克隆中央仓库 master ,并在本地建立开发分支,追踪该分支:
2. 开发新功能:
基于 develop 分支创建开发新功能 feature 分支:
> git checkout - b feature-some develop
然后进行正常开发:
新功能开发完成:
3. 准备发布:
使用新的分支进行发布准备工作:
> git checkout -b release-0.1 develop
这个分支是清理发布、执行所有测试、更新文档和其它为下个发布做准备操作的地方,像是一个专门用于改善发布的功能分支。
4. 完成发布:
一旦准备好了发布,合并修改到 master 和 develop 分支上:
发布分支是作为功能开发(develop分支)和对外发布(master分支)间的缓冲。只要有合并到 master 分支,就应该打好 tag 以方便跟踪:
5. 发现 Bug
基于 master 分支创建维护分支 hotfix,解决问题以后,合并回 master:
同发布分支相同,维护分支中新加的重要修改也要推到 develop 分支中:
The text was updated successfully, but these errors were encountered: