Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git flow - how to start working on existing feature branch

Tags:

git

git-flow

I would like to start working on another developer's feature branch (we use git and git flow). AFAIK The branch has been published (pushed). How can I get it to my local repository?

I tried:

git flow feature pull origin/XXXXXX-1003b

fatal: 'origin/XXXXXX-1003b' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
Failed to pull from remote 'origin/XXXXXX-1003b'.

And:

git flow feature pull XXXXXX-1003b

fatal: 'XXXXXX-1003b' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
Failed to pull from remote 'XXXXXX-1003b'.

Please advise. Thanks

like image 590
FazoM Avatar asked Oct 28 '13 15:10

FazoM


1 Answers

git flow feature track

To track an existing feature branch on a remote, use feature track:

git flow feature track xxxxxx-1003b

Alternatively just do it "the normal way":

git fetch origin
git branch -a # list all branches
git checkout feature/xxxxxx-1003b

I.e. update the remote origin, and then checkout the branch corresponding to your colleague's branch.

like image 134
AD7six Avatar answered Oct 01 '22 17:10

AD7six