Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git flow with github - pushing to central repo

I've setup a repository on Git hub and I'm using git flow. I know how to create features, releases and hotfixes, however from what I've read so far it doesn't seem clear how you push to the central repository (github), therefore I've got a few questions:

  1. Once a feature is finished and you have ran git flow feature finish how do you then push this to github?
  2. Once it is pushed to Github do I ever need to pull from Github or do we never touch the central repo and simply use it so that other developers/servers can pull from it?
  3. How do the developers pull from the central repo using git flow?

Thanks

like image 790
Derek Carlisle Avatar asked Nov 16 '12 11:11

Derek Carlisle


1 Answers

To push back to github, there isn't a real command in git-flow as it's just:
git push origin develop if you just touched the develop branch and git push origin master if you also touched the master branch. (I started using the branch name as per git 2.0 the default behavior of git push will change to not pushing all branch when do a git push)

If you work with a group of developers you always need to pull from the central repo before you do work as others might have pushed changes and you don't have them. You can either do it by hand or use the git flow flag.

If you start a new feature:
git flow feature start -F foo

This will fetch the develop branch and checks if your branch if equal to the remote branch, if it's not the feature won't start and you have to make sure they are.

It's important to know the basics of git before you start using git-flow.
I also suggest to read would Distributed Git - Distributed Workflows

like image 173
Peter van der Does Avatar answered Sep 21 '22 17:09

Peter van der Does