我在我的分支中有以下历史记录:
- "commit 3" (origin/master)
- "commit 2"
- "commit 1" (master 落后2个版本)
- ... 以前的提交
我想要从历史记录中删除commit 2和commit 3,这样commit 1就是最新的。我是唯一使用这个仓库的人。
我正在使用SourceTree,在终端中输入了以下命令:
git rebase -i
我得到了一个彩色屏幕,但无法输入命令。我该怎么办?
编辑:
推送错误
ssh: connect to host <myhost> port 22: Bad file number
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
vim
- 尝试运行git config --global core.editor EDITOR_OF_CHOICE
。 - Eric