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
?
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.
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With