[英]Git flow with github - pushing to central repo
I've setup a repository on Git hub and I'm using git flow. 我在Git hub上设置了一个存储库,我正在使用git flow。 I know how to create features, releases and hotfixes, however from what I've read so far it doesn't seem clear how you push to the central repository (github), therefore I've got a few questions:
我知道如何创建功能,发行版和修补程序,但是从我到目前为止所读到的内容看起来并不清楚如何推送到中央存储库(github),因此我有几个问题:
git flow feature finish
how do you then push this to github? git flow feature finish
那么如何将其推送到github? Thanks 谢谢
To push back to github, there isn't a real command in git-flow as it's just: 要回到github,git-flow中没有真正的命令,因为它只是:
git push origin develop
if you just touched the develop branch and git push origin master
if you also touched the master branch. git push origin develop
如果你刚触及develop分支并且git push origin master
如果你也触及了master分支,那么就会开发。 (I started using the branch name as per git 2.0 the default behavior of git push will change to not pushing all branch when do a git push) (我开始按照git 2.0使用分支名称,git push的默认行为将改为在执行git push时不推送所有分支)
If you work with a group of developers you always need to pull from the central repo before you do work as others might have pushed changes and you don't have them. 如果您与一组开发人员合作,您总是需要在工作之前从中央仓库撤出,因为其他人可能已经推动了更改并且您没有更改。 You can either do it by hand or use the git flow flag.
您可以手动执行或使用git flow标志。
If you start a new feature: 如果您开始新功能:
git flow feature start -F foo
This will fetch the develop branch and checks if your branch if equal to the remote branch, if it's not the feature won't start and you have to make sure they are. 这将获取开发分支并检查您的分支是否等于远程分支,如果不是该功能将无法启动而您必须确保它们是。
It's important to know the basics of git before you start using git-flow. 在开始使用git-flow之前了解git的基础知识非常重要。
I also suggest to read would Distributed Git - Distributed Workflows 我还建议阅读分布式Git - 分布式工作流程
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.