1. 后悔药

1.1. 最倒霉 -- 错误 commit 提交到了 remote

git log # 查看想回到第几个
git rebase -i HEAD~3  #  pick 其中一个,其余删除或者加 # comment 掉
ctrl + x  # exit
yes  # save
回车  # 退出模式

然后进行修改,最后 git push origin +master 覆盖掉 remote 的提交。

Copyright © Guanghui Wang all right reserved,powered by GitbookFile Modified: 2019-08-25 13:56:34

results matching ""

    No results matching ""