Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using Git Flow, the successful branching model

I joined a project and they kinda have a chaos for code testing and version control solution, so I am in charge of implementing those and more.

Me, being relatively new to Git, I was wondering how should I implement the http://nvie.com/posts/a-successful-git-branching-model/ ? And by that I mean:

  • Should I setup the git repository using git flow init on the LAMP server (where all the testing and version control will be held)?
  • How do I push some changes to a specific feature_x / hotfix_y / releas_z branch in the remote repository?
  • Should I have the same git flow init setup, on my local cloned repository?

I have a basic knowledge of git, so I would appreciate your guidance on this.

UPDATE

If you know a better solution on how to use a control version system and be able to sync from local to live and/or testing environment, please let me know... I'm willing to learn

like image 655
Alex Avatar asked Nov 19 '25 04:11

Alex


1 Answers

git-flow is not something you ordinarily run on your remote server, and is merely a tool to aide managing branches. You would only run git flow init on not-bare checkouts where someone is going to be doing development work. So, in order:

  • No, you'd just create a bare git repo (using git flow doesn't fundamentally change how to use git)
  • With git push (or, the first time only with: git push --set-upstream origin feature/name-of-current-feature - this is also in the error message in the current version of git trying to push on a branch not tracking anything)
  • Yes
like image 135
AD7six Avatar answered Nov 20 '25 20:11

AD7six



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!