我在我的分支中有以下历史记录。从Git中删除推送提交
- “承诺3”(产地/主)
- “犯2”
- “承诺1”(主2落后)
- ...以前提交
我想从历史中删除提交2和3。所以第一次提交是最新的。我是唯一使用这个存储库的人。
我使用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
你想从你的本地仓库或本地和远程仓库中删除这些提交? – R0MANARMY
本地和远程 – Nfear