문제

Suppose I have a tracking branch named 'abc' which tracks origin/master.

When I'm on 'abc' and do a git push, it pushes 'abc' to 'abc'.
How do I specify the remote push branch for it with just a 'git push'?

도움이 되었습니까?

해결책

git branch --set-upstream-to abc origin/master

should be able to specify the remote branch.

Note the -to added to --set-upstream since git1.8.0.

Since Git1.7.0:

"git branch --set-upstream" can be used to update the (surprise!) upstream, i.e. where the branch is supposed to pull and merge from (or rebase onto).

다른 팁

"git push" without a remote branch explicitly named will attempt to push to the site named "origin"

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top