简体   繁体   English

如何删除我对存储库所做的所有提交并永久删除 Git 存储库

[英]How to delete all the commits I have made to a repository and to permanently delete a Git repository

I was brought on board as a contractor to do some work on a forked open source repository.我作为承包商被带到船上,在一个分叉的开源存储库上做一些工作。 After finishing the work and a successful launch, the hirer is ghosting me and refuses to compensate me as agreed.在完成工作并成功发布后,租用人在欺骗我并拒绝按约定赔偿我。 How can I either: permanently delete the repository without the option to restore (I still have access to Git as the owner and I'm the only one who pushed commits) or permanently delete all my pushed commits from history.我该如何选择:永久删除存储库而不选择恢复(我仍然可以作为所有者访问 Git,并且我是唯一推送提交的人)或从历史记录中永久删除我所有推送的提交。

Side question: If a site is deployed on Cloudflare off a specific branch and I delete the repository, what happens?附带问题:如果一个站点部署在 Cloudflare 上的某个特定分支上,而我删除了存储库,会发生什么? I'm assuming the webpage stays deployed based off whatever was compiled last.我假设网页根据最后编译的内容保持部署。

In the setting of the repo scroll down to bottom you will get the danger zone.在 repo 的设置中向下滚动到底部,您将获得危险区域。 There you can archive or delete the repo.在那里你可以存档或删除 repo。 for detailed guide visit https://docs.github.com/en/repositories/creating-and-managing-repositories/deleting-a-repository有关详细指南,请访问https://docs.github.com/en/repositories/creating-and-managing-repositories/deleting-a-repository

There are many ways to restore data depending on the infrastructure and the language that is used.根据基础架构和使用的语言,有许多方法可以恢复数据。 Without more specific informations it is impossible to say how to fully delete the data.如果没有更具体的信息,就不可能说出如何完全删除数据。 Anyways to override the history of a git branch you could use:无论如何,要覆盖 git 分支的历史记录,您可以使用:

git push -f {branchName} git push -f {branchName}

Vist: https://docs.github.com/en/repositories/creating-and-managing-repositories/restoring-a-deleted-repository访问: https://docs.github.com/en/repositories/creating-and-managing-repositories/restoreing-a-deleted-repository

To restore deleted repo you can try sending a mail to support@github.com要恢复已删除的存储库,您可以尝试发送邮件至 support@github.com

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM