git-flow: how to checkout release branch from origin?

ChrisR picture ChrisR · Apr 30, 2011 · Viewed 19.9k times · Source

What is the perferred workflow to pull a published release branch from the central repo using git-flow?

eg:
Mike made a release branch, he published it through "git flow release publish 1.0"
Jane would like to work on that release branch too, how does she pull it from the central repo to continue working with git flow on that particular branch?

  • create the branch herself locally through git flow release start 1.0 and then git pull?
  • create a tracking branch locally through git with git checkout -b release/1.0 origin/release/1.0 and continue from there (does git flow work on the branch this way?)

Answer

ChrisR picture ChrisR · Jul 12, 2011

All that is needed is setting up a local tracking branch, no git-flow specific commands are needed. Git-flow apparently only cares about the name of the branch and if it is prefixed with the "release/" string.

So setting up a local tracking branch like git branch --track release/1.5 origin/release/1.5 is all there is to it.