我需要帮助解决从GitHub拉取时git合并冲突的问题,我在当前分支上进行了以下操作:
git pull --rebase master
git pull ssh:.....
(从我的评论中获取更改)- 一个文件中有合并冲突
- 删除所有冲突
git add .
- 当我尝试使用
git commit --amend
提交回来时,出现错误
"fatal: you are in the middle of merge -- cannot amend"
我想要再次修改相同的提交,而不会创建新的提交ID。有什么方法吗?
git status
命令?如果您看到一个消息显示仍然存在一些冲突,则会阻止您进行提交。 - Tim Biegeleisengit status
显示所有冲突已解决时,运行git merge --continue
。 - tehhowchgit merge --continue
只是在“引擎盖下”运行git commit
。很高兴 Git 团队在 Git 版本 2.12.0 中添加了这个选项。但如果你的 Git 版本早于此版本,你必须使用git commit
。 - torek