Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

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?

like image 766
AdamT Avatar asked Feb 06 '13 16:02

AdamT


People also ask

How do I push a code into Origin?

To push the branch or you can say to push the changes in the branch to the Github repo you have to run this command “git push origin <the branch name>” in our case the branch name is “main”. After pushing the changes the repo will look like and this is how you can push a branch to a remotely hosted GitHub repository.

What does push branch to remote mean?

Pushing is how you transfer commits from your local repository to a remote repo. It's the counterpart to git fetch , but whereas fetching imports commits to local branches, pushing exports commits to remote branches. Remote branches are configured using the git remote command.


2 Answers

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.

like image 193
Daniel Hilgarth Avatar answered Sep 19 '22 06:09

Daniel Hilgarth


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.

like image 23
Decebal Avatar answered Sep 19 '22 06:09

Decebal