문제

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.

도움이 되었습니까?

해결책

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
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top