Restart/undo conflict resolution in a single file

前端 未结 2 1823
时光说笑
时光说笑 2020-12-02 04:34

In a larger git merge with several conflicting files, I incorrectly marked a file as resolved (using git add FILE after some editing)

Now I\'d like to u

相关标签:
2条回答
  • 2020-12-02 05:13
    git reset HEAD FILE
    

    Example

    $ git status
    # On branch master
    # Changes to be committed:
    #   (use "git reset HEAD <file>..." to unstage)
    
    0 讨论(0)
  • 2020-12-02 05:14

    Found the solution here: http://gitster.livejournal.com/43665.html

    git checkout -m FILE
    

    This restores the unresolved state, including all information about parent and merge base, which allows restarting the resolution.

    0 讨论(0)
提交回复
热议问题