Git flow track – already exists

Git flow track – already exists

I am learning GIT (with Git Flow) and I know its not good to use StackOverflow instead of a book.

I am involved in a project. There are two feature branches named F1 and F2 maintained by groups G1 and G2. Assume F1 depends on F2 and G1 has published its branch using git flow feature publish F1.

Now G2 needs to track F1 and well may be do a re-base on top of F1 from time to time. For this I red that we need to use git flow track

So I (of G2) used some thing like this

git flow feature checkout F2
git flow feature track F1

But Git is saying the following:

Branch 'feature/F1' already exists. Pick another name.

Then I tried a name that didn’t and hoped it will at some point ask me for the branch that needs to be tracked. But then I got this message.

git flow feature track F1_track
Branch 'origin/feature/F1_track' does not exist and is required.

Am I doing some thing silly? Could it be an issue with my installation?

I believe you understand what I am trying to do, could you please help me out in the issue.

When you consider the code of git flow feature track, all that it does is creating a local branch tracking a remote one.

If you already have a local feature/F1 branch, check that it does track origin/feature/F1 with git branch -av:

  • if it does, you have nothing to do
  • if it doesn’t, you can set the tracking relationship yourself
    git branch -u origin/feature/F1 feature/F1
.
.
.
.