Pergunta

I'm trying to wrap my head around the Git-flow model, and one thing I'm struggling with is where each branch lives. Here is my current understanding, just from reading up - this hasn't actually been implemented so I have no hands on experience:

  1. All repos have two main branches. Everyone pushes and pulls from develop almost always.
  2. One developer would be in charge of creating the release branch, locally, and pushing it to the "central" repo where other developers could contribute to it for it's limited lifespan. Same goes for hotfix branches.

If my current understanding is accurate, my actual question is around remote branches. If I were to delete the release branch once it's merged back into master, how does that change make its way to other developer's local repos?

Foi útil?

Solução

I suggest you to start using git flow extension. It makes life a lot simpler for implementing git flow.

Once you install, gitflow extension you can create a release branch like this,

git flow release start release-branch-name

Then you push the branch to the remote repo. All developers will work on the release branch. Once you are ready to close release branch, issue following command.

git flow release finish release-branch-name

This will merge your changes back to master and develop.

When other developers fetch the changes git fetch --all, they will recieve the changes.

They will have to use git fetch -p, to have the release branch deleted from their machines.

Hope this helps

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top