Git error on commit after merge - fatal: cannot do a partial commit during a merge

前端 未结 18 1522
长情又很酷
长情又很酷 2020-12-07 07:15

I ran a git pull that ended in a conflict. I resolved the conflict and everything is fine now (I used mergetool also).

When I commit the resolved file

18条回答
  •  旧时难觅i
    2020-12-07 07:26

    You can use git commit -i for most cases but in case it doesn't work

    You need to do git commit -m "your_merge_message". During a merge conflict you cannot merge one single file so you need to

    1. Stage only the conflicted file ( git add your_file.txt )
    2. git commit -m "your_merge_message"

提交回复
热议问题