After fixing conflicts git still complains?

后端 未结 5 1505
半阙折子戏
半阙折子戏 2021-02-01 02:43

I usually rebase when I pull in changes from my teammates, and often time I have conflicts:

...
CONFLICT (content): Merge conflict in app/views/sear         


        
5条回答
  •  粉色の甜心
    2021-02-01 03:41

    I agree with Mark Rushakoff that fixing commits should not include committing them.

    There is at least one other way that git will continue to say that "You must edit all merge conflicts and then mark them as resolved using git add" even after you have done just this. This may occur if you remove files from git version control, but leave the unversioned file sitting in your working tree and then try to perform a rebase.

    I was able to fix this problem as follows:

    1. Terminate rebase with git rebase --abort
    2. Determine offending file by looking at git status
    3. I moved my unversioned files to my tmp directory
    4. Redo the rebase - in my case git svn rebase
    5. If you want the unversioned file hanging around, move it back where you want it (I left mine in my tmp directory)

    Hope that helps.

提交回复
热议问题