小编Emp*_*lip的帖子

使用git rebase编辑提交

我在编辑提交时遇到问题。

我有2个.php文件的2次提交。我的目标是同时编辑它们。我读了一下rebase -i,这是我认为应该做的:

  • 首先我pick改为edit;
  • 保存并退出;
  • 变基停止;
  • 类型git commit --amend;
  • 进行更改,保存并关闭文本编辑器;
  • 类型git rebase --continue

在此之后,我相信变基会再次停止,因此我必须为第二次提交重新做一遍。

但是在我输入后,我git rebase --continue得到了这个:

file1.php: needs update
You must edit all merge conflicts and then
mark them as resolved using git add
Run Code Online (Sandbox Code Playgroud)

有什么问题,我该怎么办?

git git-rebase

3
推荐指数
1
解决办法
2808
查看次数

标签 统计

git ×1

git-rebase ×1