Git Can';不要推也不要拉

Git Can';不要推也不要拉,git,atlassian-sourcetree,bitbucket-server,Git,Atlassian Sourcetree,Bitbucket Server,我对使用Git还相当陌生,但我确实了解基本知识。然而,到目前为止,我还没有遇到推拉冲突的情况 另外,我应该指出,我用来与Git存储库交互的GUI工具是Atlassian SourceTree(我们使用Atlassian Stash来管理我们的回购) 以下是场景: 我有两次提交到推送,显然有4次更改需要拉送 当我尝试拉时,我得到以下结果: git -c diff.mnemonicprefix=false -c core.quotepath=false fetch origin git -c di

我对使用Git还相当陌生,但我确实了解基本知识。然而,到目前为止,我还没有遇到推拉冲突的情况

另外,我应该指出,我用来与Git存储库交互的GUI工具是Atlassian SourceTree(我们使用Atlassian Stash来管理我们的回购)

以下是场景:

我有两次提交到
推送
,显然有4次更改需要
拉送

当我尝试
时,我得到以下结果:

git -c diff.mnemonicprefix=false -c core.quotepath=false fetch origin

git -c diff.mnemonicprefix=false -c core.quotepath=false pull --no-commit origin master
You have not concluded your merge (MERGE_HEAD exists).

Please, commit your changes before you can merge.

Completed with errors, see above.
git -c diff.mnemonicprefix=false -c core.quotepath=false push -v --tags origin master:master
Pushing to http://XXXXXX@XXXXXXXX.XXXX.XXXX:XXXX/XXXX/XXXX/XXXXX.git
To http://XXXXXX@XXXXXXXX.XXXX.XXXX:XXXX/XXXX/XXXX/XXXXX.git
 ! [rejected]        master -> master (non-fast-forward)
error: failed to push some refs to 'http://XXXXXX@XXXXXXXX.XXXX.XXXX:XXXX/XXXX/XXXX/XXXXX.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
它说我需要完成合并,但它不允许我做任何事情。我没有得到合并列表,也不是自动合并。我似乎无法通过合并,因此我可以继续解决推/拉冲突

当我尝试按下
按钮时,我得到以下信息:

git -c diff.mnemonicprefix=false -c core.quotepath=false fetch origin

git -c diff.mnemonicprefix=false -c core.quotepath=false pull --no-commit origin master
You have not concluded your merge (MERGE_HEAD exists).

Please, commit your changes before you can merge.

Completed with errors, see above.
git -c diff.mnemonicprefix=false -c core.quotepath=false push -v --tags origin master:master
Pushing to http://XXXXXX@XXXXXXXX.XXXX.XXXX:XXXX/XXXX/XXXX/XXXXX.git
To http://XXXXXX@XXXXXXXX.XXXX.XXXX:XXXX/XXXX/XXXX/XXXXX.git
 ! [rejected]        master -> master (non-fast-forward)
error: failed to push some refs to 'http://XXXXXX@XXXXXXXX.XXXX.XXXX:XXXX/XXXX/XXXX/XXXXX.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
现在我该怎么解决这个问题?!我是不是必须重新设置基础或类似的东西


我读到了一篇关于快进推送的文章,但是我不知道如何在这个工具中做到这一点。如果必须的话,我当然可以从终端执行Git命令。我只是不想在没有咨询对Git和这类问题有更好理解的人的情况下就开始讨论这个问题。

完成合并<代码>git状态
将告诉您挂起了什么。对于每一个,您都需要编辑以修复冲突,并执行
git add
。然后
git提交
。然后拉,然后推。

看起来你正处于合并的中间(也许是以前的尝试)


git merge--abort
将取消该合并,并使您处于一种可以重试拉取然后解决冲突的状态。

我刚刚意识到,问我的问题并发布
pull
输出可能听起来非常愚蠢,其中说“
您尚未完成合并(合并头存在)。请在合并之前提交您的更改。
“请不要提及它不允许我合并任何内容。这可能是我的职位被否决的原因。我编辑了我的帖子来提到这个问题。谢谢你的回复。按照你的建议,我能使事情顺利进行。我试了几次,但还是发现了同样的问题。因此,我尝试在再次运行
git merge--abort
之前关闭SourceTree,然后再次执行
Pull
。然后我打开SourceTree,我的合并列表终于出现了。我能够继续合并并解决所有其他问题。感谢您的帮助!我真的很感激。也谢谢你的回复。如果在我尝试合并时没有发生奇怪的事情,您的回答可能是处理该问题的可接受的解决方案。然而,我选择了@Darren Clark的答案,因为它更适合我的特定场景。再次感谢!