Reputation: 812
Okay, so I have some repository and I create a feature branch using git flow...
git flow feature start refactor
Now I hack around at it for a bit and decide to test code on another system...
git add code
git commit -m 'refactored stuff'
git flow feature publish refactor
Now I have some branch in github named feature/refactor. Now I go to another machine and browse to the project folder.
How do I check that new branch out? I've tried...
git checkout feature/refactor
... and git doesn't like it because there's a slash in the argument? I'm not sure what I'm doing wrong here. Can anyone point me in the right direction? I've also tried...
git flow feature pull refactor
... but git doesn't seem to like that either.
Upvotes: 1
Views: 2540
Reputation: 19356
If you want to get a branch from remote, you have to specify the repo with the -t
option.
git checkout -t origin/feature/refactor
You can change origin for whatever the name of your remote is. This command create a new branch in your local repository named feature/refactor
and that branch is going to be connected with your remote branch origin/feature/refactor
that you published before.
There is a command to track also in gitflow, you should try it:
git flow feature track refactor
Upvotes: 2