How to push the “develop” branch to the remote “origin”?

拜拜、爱过 提交于 2019-12-20 17:36:46

问题


When I do git flow init it creates a master and develop branches. When I add the remote I do git remote add origin git@github.com:NewB/our-repo.git. Now I have git flow initialized on my local repo and I have the remote repo added. After I do git push -u origin master I have master in my origin but not the develop branch. Is there a git flow publish for the develop branch? All I'm seeing are publish for feature or release branches. Does git-flow want me to just use regular git and do git push origin develop?


回答1:


Does git-flow want me to just use regular git and do git push origin develop?

Yes, that's what you do. Simply use the regular git command.

I assume the reason for this design choice is:
The develop branch is created only once. No need for a helper command to publish it.
Feature branches get created all the time. Here, a helper command is, well..., helpful.




回答2:


I found this cheatsheet very helpfull on understanding git flow : cheatsheet .

Provided that you respect git flow principles you shouldn't need to publish your development branch, when collaborating you should publish a feature, when publishing to master you should use a release.

That's how i use it.

I hope this is helpfull to you.



来源:https://stackoverflow.com/questions/14733712/how-to-push-the-develop-branch-to-the-remote-origin

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!