Pergunta

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

Foi útil?

Solução

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
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top