Cant commit after starting a merge in Sourcetree

后端 未结 5 1310
后悔当初
后悔当初 2020-12-28 13:43

When trying to commit after a merge I\'m getting this error message:

\"fatal: You are in the middle of a merge -- cannot amend.\"

<
5条回答
  •  悲哀的现实
    2020-12-28 14:07

    You can manually delete .git/MERGE_HEAD and Git won't be able to tell that you were just doing a merge. It will let you amend the previous commit with the changes in your index just like normal.

    Please read:

    Though this would work, it is a hack and not recommended. All is needed here is to let git know the merge is completed git commit -a as per this answer

提交回复
热议问题