Reputation: 32321
I am using git version 1.7.11.msysgit.0
I created a repository under GitHUB and added a file called as README.md with some text content .
Later on , I have installed GIT Client , did a clone to get the server contents on to my machine .
Then I deleted the file README.md on to my local machine .
Now when I do git commit , I get this error
praveenk@MSIN-BT-100 /d/workspace/MYTestRepo (master|MERGING)
$ git commit ;
U README.md
error: 'commit' is not possible because you have unmerged files.
hint: Fix them up in the work tree,
hint: and then use 'git add/rm <file>' as
hint: appropriate to mark resolution and make a commit,
hint: or use 'git commit -a'.
fatal: Exiting because of an unresolved conflict.
This is with git pull
:
$ git pull;
U README.md
A One.txt
Pull is not possible because you have unmerged files.
Please, fix them up in the work tree, and then use 'git add/rm <file>'
as appropriate to mark resolution, or use 'git commit -a'.
How to resolve these errors ?
Upvotes: 34
Views: 105184
Reputation: 2823
Images get requested by the browsers even if they have the display property set to none. To prevent this, you can implement the solution I mentioned before, but if you are going to be toggling the visibility of the image too much, adding and removing the image from the HTML can be an unnecessary cost of performance that you can avoid by using the display:none property.
Upvotes: -1
Reputation: 13733
Do this:
git merge --abort
git pull (to be sure you're up-to-date)
Now replace the contents of the README.md file with what you want it to say. If you don't want it at all, do git rm README.md
Then if you replaced the contents, commit and push those contents with:
git add README.md
git commit -m "comment"
git push
Upvotes: 44
Reputation: 5387
Try:
git reset README.md
I had a similar issue and this was the only thing that solved it.
Upvotes: 12
Reputation: 1323075
While a git reset
is a good solution, note that the warning message has now a better format (Git 2.1, August 2014)
See commit d795216 and commit c057b24 by Jeff King (peff
):
The irregular line-wrapping makes this awkward to read, and it takes up more lines than necessary. Instead, let's rewrap it to about 60 characters per line.
The quotes around "commit
" are clunky; the user doesn't care that this message is a template with the command-name filled in.
$ git commit
U foo
error: commit is not possible because you have unmerged files.
hint: Fix them up in the work tree, and then use 'git add/rm <file>'
hint: as appropriate to mark resolution and make a commit, or use
hint: 'git commit -a'.
fatal: Exiting because of an unresolved conflict.
Upvotes: 3