in Technology by
How can we abort the merge if there is a merge conflict?

1 Answer

0 votes
by
 
Best answer

Since your pull was unsuccessful then HEAD (not HEAD^) is the last "valid" commit on your branch:

git reset --hard HEAD

The other piece you want is to let their changes over-ride your changes.

Older versions of git allowed you to use the "theirs" merge strategy:

git pull --strategy=theirs remote_branch
git fetch origin
git reset --hard origin

Related questions

0 votes
    I used git pull and had a merge conflict: unmerged: _widget.html.erb You are in the middle of a conflicted merge. ... can I do this? Select the correct answer from above options...
asked Feb 2, 2022 in Education by JackTerrance
0 votes
    What is a merge conflict in Git, and how can it be resolved?...
asked Oct 4, 2020 in Technology by Editorial Staff
0 votes
    Due to increase in ………………….., there is increase in religious conflict. (a) communalism (b) terrorism (c) corruption (d) casteism Please answer the above question....
asked Aug 13, 2022 in Education by JackTerrance
0 votes
    What is the difference between STOP and ABORT options in Workflow Monitor?...
asked Mar 26, 2021 in Technology by JackTerrance
0 votes
    Which of the following attribute triggers an abort event? A - offline B - onabort C - abort D - onbeforeonload...
asked Dec 3, 2020 in Technology by JackTerrance
0 votes
    The entity that normally is supposed to determine whether an academic researcher's conflict of interest can be managed is:...
asked Nov 29, 2020 in Technology by Editorial Staff
0 votes
0 votes
0 votes
    What is a conflict in Git and how to resolve it?...
asked Nov 4, 2020 in Technology by JackTerrance
0 votes
    How to resolve a conflict in Git?...
asked Nov 2, 2020 in Technology by JackTerrance
0 votes
    As asked in this question, I also want to know how to resolve a conflicting git stash pop without ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 2, 2022 in Education by JackTerrance
0 votes
    I was unable to find a solution that is identical with the issue I am trying to solve. If is a ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 24, 2022 in Education by JackTerrance
0 votes
    I was unable to find a solution that is identical with the issue I am trying to solve. If is a ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 23, 2022 in Education by JackTerrance
0 votes
    Which of the following most accurately describes an institutional conflict of interest?...
asked Nov 29, 2020 in Technology by Editorial Staff
...