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
?
Asked
Active
Viewed 2.6k times
21
2 Answers
14
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.

Daniel Hilgarth
- 171,043
- 40
- 335
- 443
-
Sorry, but I'm confused. "Yes, that's what you do". What? `git flow publish`? – Apr 13 '18 at 15:46
-
"Does git-flow want me to just use regular git and do git push origin develop?" -> "Yes, that's what you do" – Daniel Hilgarth Apr 13 '18 at 15:48
-
1Thanks. I hope you don't mind I added that to your answer for contextual and posterity reasons. – Apr 13 '18 at 15:49
5
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.

Decebal
- 1,376
- 1
- 21
- 36
-
7sry to haunt your past self but the author of git-flow does explicitly git push origin develop in his explanation of git-flow http://nvie.com/posts/a-successful-git-branching-model/ (@Incorporating a finished feature on develop ) – braunbaer Feb 25 '15 at 14:04
-
1I was asking myself this very question. I agree with @decebal because everything is in master so I pull from master to get my teams work, perform all the necessary merges, switch back to develop then start my new feature. If I want to quickly do a hotfix and ignore my feature, I switch to master, create a hotfix, complete it and push - leaving all my local work unaffected by the changes I made on master. – Andy Nov 20 '17 at 09:22