How to push the "develop" branch to the remote "origin"?
Solution 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.
Solution 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.
Related videos on Youtube
AdamT
Updated on July 09, 2022Comments
-
AdamT almost 2 years
When I do
git flow init
it creates amaster
anddevelop
branches. When I add the remote I dogit remote add origin [email protected]:NewB/our-repo.git
. Now I have git flow initialized on my local repo and I have the remote repo added. After I dogit push -u origin master
I havemaster
in my origin but not thedevelop
branch. Is there agit flow publish
for thedevelop
branch? All I'm seeing arepublish
forfeature
orrelease
branches. Does git-flow want me to just use regular git and dogit push origin develop
? -
braunbaer over 9 yearssry to haunt your past self but the author of git-flow does explicitly git push origin develop in his explanation of git-flow nvie.com/posts/a-successful-git-branching-model (@Incorporating a finished feature on develop )
-
Andy over 6 yearsI 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.
-
THE JOATMON about 6 yearsSorry, but I'm confused. "Yes, that's what you do". What?
git flow publish
? -
Daniel Hilgarth about 6 years"Does git-flow want me to just use regular git and do git push origin develop?" -> "Yes, that's what you do"
-
THE JOATMON about 6 yearsThanks. I hope you don't mind I added that to your answer for contextual and posterity reasons.