我正在尝试将我的 git repo 设置为在我的分支上设置上游,但它不起作用。
我的 .git/config 看起来像:
[core]
repositoryformatversion = 0
filemode = false
logallrefupdates = true
[remote "origin"]
url = ssh://cjdawson@new.initialreality.com:22/git-repos/webmessage/server/java/webmessage-server.git
fetch = +refs/heads/*:refs/remotes/origin/*
fetch = refs/notes/*:refs/notes/*
push = HEAD:refs/for/master
pushurl = ssh://cjdawson@new.initialreality.com:22/git-repos/webmessage/server/java/webmessage-server.git
[branch "master"]
remote = origin
merge = refs/heads/master
[branch "develop"]
remote = origin
merge = refs/heads/develop
[gerrit]
createchangeid = true
[push]
default = upstream
当我跑步时,git remote show origin
我得到:
* remote origin
Fetch URL: ssh://cjdawson@new.initialreality.com:22/git-repos/webmessage/server/java/webmessage-server.git
Push URL: ssh://cjdawson@new.initialreality.com:22/git-repos/webmessage/server/java/webmessage-server.git
HEAD branch: master
Remote branches:
develop tracked
master tracked
Local branches configured for 'git pull':
develop merges with remote develop
master merges with remote master
Local ref configured for 'git push':
HEAD pushes to refs/for/master (up to date)
如果我运行git push origin develop
or git branch -u origin/develop
,则 show origin 的输出不会改变。我的配置有问题吗?