Explore Courses Blog Tutorials Interview Questions
+5 votes
in DevOps and Agile by (19.4k points)
edited by

I used git pull and had a merge conflict:

unmerged:   _widget.html.erb

You are in the middle of a conflicted merge.

I know that the other version of the file is good and that mine is bad so all my changes should be abandoned. How can I do this?

1 Answer

+5 votes
by (27.5k points)
edited by

The follwoing command should do the magic:

git merge --abort

Check the status once using the following command:

git status

Git suggests solutions to this sort of issues.

For more information please go through the following tutorial to get more info about git:


git abort merge - I ran into a merge conflict. How can I abort the merge?
by (29.3k points)
Save changes in the local system, or else uncommitted changes will be lost because of this command.

Browse Categories