Git Pull is Not Possible, Unmerged Files

后端 未结 8 2072
小蘑菇
小蘑菇 2020-12-07 07:47

I\'ve read all of the similar questions on this; it seems that none of the following have worked:

Delete offending files
git reset --hard HEAD
git stash
git          


        
8条回答
  •  死守一世寂寞
    2020-12-07 08:29

    Ryan Stewart's answer was almost there. In the case where you actually don't want to delete your local changes, there's a workflow you can use to merge:

    • Run git status. It will give you a list of unmerged files.
    • Merge them (by hand, etc.)
    • Run git commit

    Git will commit just the merges into a new commit. (In my case, I had additional added files on disk, which weren't lumped into that commit.)

    Git then considers the merge successful and allows you to move forward.

提交回复
热议问题