不小心删除了所有过去的提交

问题描述 投票:0回答:0

我强行将一些东西推送到我的 github 存储库中。这是我第一次在命令中使用武力。推送后,我之前的所有提交都已从 github 中删除。我不知道这是默认行为还是我做错了什么但是有什么办法可以恢复我以前的提交吗?如果有帮助,我不介意删除强制提交。

git push -f --set-upstream origin main 这是我用来推送的命令,但它删除了我之前的所有提交。

git github git-commit git-push
© www.soinside.com 2019 - 2024. All rights reserved.