How to push the "develop" branch to the remote "origin"?

25,588

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.

Share:
25,588

Related videos on Youtube

AdamT
Author by

AdamT

Updated on July 09, 2022

Comments

  • AdamT
    AdamT almost 2 years

    When I do git flow init it creates a master and develop branches. When I add the remote I do git 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 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?

  • braunbaer
    braunbaer over 9 years
    sry 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
    Andy over 6 years
    I 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
    THE JOATMON about 6 years
    Sorry, but I'm confused. "Yes, that's what you do". What? git flow publish?
  • Daniel Hilgarth
    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
    THE JOATMON about 6 years
    Thanks. I hope you don't mind I added that to your answer for contextual and posterity reasons.