【问题标题】:How can I recover from an erronous git push --force origin main [duplicate]如何从错误的 git push --force origin main [重复] 中恢复
【发布时间】:2022-01-12 23:57:58
【问题描述】:

如何从 git push --force origin main 中恢复

我使用后找不到所有提交 git push --force origin main,只有最后一个,所以我可以撤消我的提交

【问题讨论】:

    标签: git github


    【解决方案1】:

    您必须使用 reflog 在您的机器上根据需要重建分支的状态,然后再次强制推送。

    【讨论】:

    • so 如何从 git push -force 中恢复
    猜你喜欢
    • 2012-09-16
    • 2017-01-05
    • 2018-07-30
    • 2016-07-10
    相关资源
    最近更新 更多