如何在不远程存储库中恢复GIT推动-f?
本地存储库A(在我系统上a上的分支功能/2.0),我确实与远程存储库B(分支主)相关联的Git Remotegit添加远程存储库B
然后什么都没有改变,直接git push -f将本地存储库a推到远程相关的存储库B,现在关联的远程存储库B被本地存储库A覆盖A contentgit push -f全局main
如何还原关联的远程存储库B的内容,我已执行git reflog - Oneline
git reset - hard< commit-hash>
git push -f onement main
存储库B内容仍然被存储库A覆盖,我想还原存储库B
Local repository A(branch feature/2.0 on A) in my system, i did git remote add associated with a remote repository B (branch main)git add remote repository B
and then nothing changed, direct git push -f push local repository A to the remote associated repository B, now the associated remote repository B is overwritten by the local repository A contentgit push -f global main
how to restore the content of the associated remote repository B,i have executedgit reflog --oneline
git reset --hard <commit-hash>
git push -f origin main
and repository B content is still overwritten by repository A,i want to restore repository B
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我回到了旧的本地仓库B,然后尝试
git push -f
,然后才能强制迫使local to local to local to remotion oild Main Maini went back to my old local repo B and try
git push -f
then it works.it will force update local to remote origin main