我有这个奇怪的问题,每当我这样做时git push
它拒绝做任何事情:
fatal: The current branch master has multiple upstream branches, refusing to push.
当我这样做git push -u origin master
时,它似乎将其设置为跟踪分支:
Branch master set up to track remote branch master from origin.
但是下次我尝试git push
它拒绝再次这样做。我试图用谷歌搜索,但问题似乎是相当新的,我找不到任何解释这种行为。想法?
更新: ./git/config
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = gitosis@xxxx.xx:milk.git
[branch "master"]
remote = origin
merge = refs/heads/master
Update2:解决git config remote.origin.push HEAD
了以下行出现在.git/config
部分[remote "origin"]
:
push = HEAD
更新3:
$ git branch -vv
billing 633c796 [origin/billing: behind 889] links
* master 1a0de50 [origin/master: ahead 1] more fixes
new_master 3b880d7 [origin/new_master] branches diverged
photo_stacks 29c8f0d [origin/photo_stacks] 1st try
responsive 1dad980 [origin/responsive] update
$ git push
fatal: The current branch master has multiple upstream branches, refusing to push.