AdamT
AdamT

Reputation: 6485

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

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?

Upvotes: 21

Views: 26800

Answers (2)

Daniel Hilgarth
Daniel Hilgarth

Reputation: 174369

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.

Upvotes: 15

Decebal
Decebal

Reputation: 1419

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.

Upvotes: 4

Related Questions