我想在我的整个历史之前的主分支上插入一个提交。我有这个我更改的软件堆栈,并将更改的版本作为初始提交提交。当我试图查看我最初更改的内容并注意到我没有首先提交原始堆栈时,我意识到我的错误已经很晚了。所以我试图在其他任何事情之前把它挤进去......
我发现了这个非常相似的问题,并认为只需添加某些文件的原始版本并提交就很简单。
但是变基开始抱怨每个文件:
CONFLICT (add/add): Merge conflict in XXXX
当我将文件合并到并尝试 rebase --continue 它仍然失败:
Applying: first version
No changes - did you forget to use 'git add'?
If there is nothing left to stage, chances are that something else
already introduced the same changes; you might want to skip this patch.
When you have resolved this problem run "git rebase --continue".
If you would prefer to skip this patch, instead run "git rebase --skip".
To restore the original branch and stop rebasing run "git rebase --abort".
而第一个版本是我的主分支上的第一个提交。
我想要做的甚至可能吗?