如何删除所有远程分支文件并重新提交本地文件? [英] How to remove all remote branch files and freshly commit local files?
本文介绍了如何删除所有远程分支文件并重新提交本地文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我把git弄乱了.我在bitbucket中有一个远程develop
分支,我想从中删除所有文件,然后从本地存储库中重新提交/推送文件.我怎样才能做到这一点?我无法删除并重新创建分支本身.
I messed something up with git. I have a remote develop
branch in bitbucket that I want to remove all files from and then to commit/push files freshly from the local repository. How can I do that? I can't remove and recreate branch itself.
推荐答案
如果您的本地环境良好,则可以git push --force origin develop
,它可以
If your local environment is good, you can git push --force origin develop
, it serves this very purpose.
这篇关于如何删除所有远程分支文件并重新提交本地文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文