我在我的 master 分支上,这是一个完美的干净(但 git 显示它比 origin/master 领先 14 次提交)。当我尝试从原点(Eagle)拉出不同的分支时,git 想让我合并一些文件。
这不是我所期望的:当拉一个分支时,它应该导入远程分支并保持当前 HEAD 不变,并且不会因合并冲突而困扰我。在我看来,这两个分支分开生活,但彼此和平相处,没有任何冲突。但这种看法不再成立。
是什么导致这些冲突以及如何在不合并的情况下恢复 2 个不同的分支?
下面是命令行上 git 会话的记录。
HEAD is now at 34e47ab ISS-652 misspelled MockBean in test/ApplicationContext
build@jenkins/p-project/workspace> git status
# On branch master
# Your branch is ahead of 'origin/master' by 14 commits.
#
nothing to commit (working directory clean)
build@jenkins/p-project/workspace> git log -5
.. Same as origin
build@jenkins/p-project/workspace> git push origin master
Everything up-to-date
build@jenkins/p-project/workspace> git status
# On branch master
# Your branch is ahead of 'origin/master' by 14 commits.
#
nothing to commit (working directory clean)
build@jenkins/p-project/workspace> git pull origin Eagle
From ssh://git@stash.europe.intranet:7999/hig/p-project-container
* branch Eagle -> FETCH_HEAD
Auto-merged pom.xml
CONFLICT (content): Merge conflict in pom.xml
Auto-merged p-project-client/pom.xml
CONFLICT (content): Merge conflict in p-project-client/pom.xml
Auto-merged p-project-container-conf/pom.xml
CONFLICT (content): Merge conflict in p-project-container-conf/pom.xml
Auto-merged p-project-container-conf/src/main/resources/dpl/P-Project_Container.xml
CONFLICT (content): Merge conflict in p-project-container-conf/src/main/resources/dpl/P-Project_Container.xml
Auto-merged p-project-container-conf/src/main/resources/was/P-Project_Container-app-env.cfg
Auto-merged p-project-container-ear/pom.xml
CONFLICT (content): Merge conflict in p-project-container-ear/pom.xml
Auto-merged p-project-container-filters/pom.xml
CONFLICT (content): Merge conflict in p-project-container-filters/pom.xml
Auto-merged p-project-container-ldap/pom.xml
CONFLICT (content): Merge conflict in p-project-container-ldap/pom.xml
Auto-merged p-project-container-tomcattest/pom.xml
CONFLICT (content): Merge conflict in p-project-container-tomcattest/pom.xml
Auto-merged p-project-container-web/pom.xml
CONFLICT (content): Merge conflict in p-project-container-web/pom.xml
Automatic merge failed; fix conflicts and then commit the result.
build@jenkins/p-project/workspace>