0

I'm trying to deploy our django project to AWS. Our fabfile that handles the deployment uses a git pull (of course). During the pull, we receive the error below:

[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!

Now I know there have been a few other users post this question on here, and believe me when I say I have read a lot of them, but none seem to work for us. There are no merge / conflict errors when committing locally, the error only seems to happen when we perform the pull from the SSH terminal of the AWS server.

nulltoken
  • 64,429
  • 20
  • 138
  • 130
schmico
  • 11
  • 1
  • 5
  • 1
    Have you run `git status`? it shuold lists the files it believes to currently be in conflict – JaredPar Aug 14 '13 at 06:14
  • 1
    It would help everyone involved if you could ***at least list which answers you have already tried***, so that no one here repeats themselves and work, especially for things you have already tried, because that would just waste everyone's time. –  Aug 14 '13 at 06:15
  • Does this answer your question? [Why does git say "Pull is not possible because you have unmerged files"?](https://stackoverflow.com/questions/26376832/why-does-git-say-pull-is-not-possible-because-you-have-unmerged-files) – Flimm Jan 03 '22 at 12:37

1 Answers1

1

Edit impact/c/views.py (in vim, nano or emacs) and you will one or more sections of

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

Decide which is the correct alternative, delete the other and all the chevrons and equals signs.

Do git commit -a -m"fixed views.py" and then git push origin master.

iankit
  • 8,806
  • 10
  • 50
  • 56
fadedbee
  • 42,671
  • 44
  • 178
  • 308