我从我们的代码库中检出了一个新分支。对于我们的develop分支,一切正常。但是在新的分支上,“push”命令没有做任何事情。一切看起来都正常——有两个提交需要推送。
我不明白为什么hotfix112没有连接到远程,但是pull操作可以。如何修复这个配置?
-> git branch -vv
develop 8ab7ef1 [origin/develop] Merge branch 'develop' of git.example.com:core-platform into develop
* hotfix112 8521cef [origin/hotfix/1.1.2: ahead 2] CORE-1263 - Completed merging from dev into hot fix.
但是 Push 并没有做任何事情:
-> git push
Everything up-to-date
-> git status
# On branch hotfix112
# Your branch is ahead of 'origin/hotfix/1.1.2' by 2 commits.
# (use "git push" to publish your local commits)
#
nothing to commit, working directory clean
我发现 'git pull' 使用远程仓库,但 'git push' 不使用:
-> git remote show origin
* remote origin
Fetch URL: git@git.example.com:core-platform.git
Push URL: git@git.example.com:core-platform.git
HEAD branch: develop
Remote branches:
core-platform-1.0.0 tracked
develop tracked
hotfix/1.1.2 tracked
master tracked
release/1.0.0 tracked
release/1.1.1 tracked
Local branches configured for 'git pull':
develop merges with remote develop
hotfix112 merges with remote hotfix/1.1.2
Local ref configured for 'git push':
develop pushes to develop (up to date)
->
我不明白为什么hotfix112没有连接到远程,但是pull操作可以。如何修复这个配置?