因为你有未合并的文件,所以不能拉

时间:2013-08-14 06:10:30

标签: git github amazon-web-services

我正在尝试将我们的django项目部署到AWS。我们处理部署的fabfile使用git pull(当然)。在拉动期间,我们收到以下错误:

[ec2-54-215-107-223.us-west-1.compute.amazonaws.com] Executing task 'deploy'
[ec2-54-215-107-223.us-west-1.compute.amazonaws.com] run: git pull origin master
[ec2-54-215-107-223.us-west-1.compute.amazonaws.com] out: U impact/c/views.py
[ec2-54-215-107-223.us-west-1.compute.amazonaws.com] out: Pull is not possible because you have unmerged files.
[ec2-54-215-107-223.us-west-1.compute.amazonaws.com] out: Please, fix them up in the work tree, and then use 'git add/rm <file>'
[ec2-54-215-107-223.us-west-1.compute.amazonaws.com] out: as appropriate to mark resolution, or use 'git commit -a'.
[ec2-54-215-107-223.us-west-1.compute.amazonaws.com] out: 


Fatal error: run() received nonzero return code 1 while executing!

现在我知道有一些其他用户在这里发布了这个问题,相信我,当我说我已经阅读了很多这些问题,但似乎没有人为我们工作。在本地提交时没有合并/冲突错误,当我们从AWS服务器的SSH终端执行拉取时,似乎只会发生错误。

1 个答案:

答案 0 :(得分:1)

修改impact/c/views.py(在vim,nano或emacs中),您将会有一个或多个部分

some stuff
>>>>>>>>>>>
(first alternative for conflict)
which may span one or more lines
===========
(second alternative for conflict)
which also may span
one or more lines
<<<<<<<<<<<
other stuff

决定哪个是正确的选择,删除其他和所有V形符号和等号。

git commit -a -m"fixed views.py"然后git push origin master