Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><code>git</code> will report that the revert resulted in a conflict. <code>git status</code> will show the unmerged paths.</p> <p>You can <a href="https://stackoverflow.com/questions/161813/how-do-i-fix-merge-conflicts-in-git">resolve the conflict</a> like any other.</p> <hr> <p>Edit with example:</p> <pre><code>$ mkdir foo $ cd foo $ git init $ echo "this is a line in a file" &gt; blah $ echo "this is a second line in a file" &gt;&gt; blah $ echo "this is a third line in a file" &gt;&gt; blah $ git add blah $ git commit -m "first commit" # edit the second line in blah $ git commit -am "second commit" # remove the second line from blah $ git commit -am "third commit" $ git revert HEAD^ #revert the second commit error: could not revert 4862546... another change hint: after resolving the conflicts, mark the corrected paths hint: with 'git add &lt;paths&gt;' or 'git rm &lt;paths&gt;' hint: and commit the result with 'git commit' $ git status # On branch master # Unmerged paths: # (use "git reset HEAD &lt;file&gt;..." to unstage) # (use "git add &lt;file&gt;..." to mark resolution) # # both modified: blah # no changes added to commit (use "git add" and/or "git commit -a") </code></pre> <p>In the case that the first commit added the file and the second modified that file, git status will show this:</p> <pre><code>$ git status # On branch master # Unmerged paths: # (use "git reset HEAD &lt;file&gt;..." to unstage) # (use "git add/rm &lt;file&gt;..." as appropriate to mark resolution) # # deleted by them: blah # </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload