从GitHub中删除代码 [英] Removing code from GitHub

查看:179
本文介绍了从GitHub中删除代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法从GitHub中完全删除一个目录及其历史记录?

Is there a way to entirely remove a directory and its history from GitHub?

推荐答案

如果您询问有关删除来自GitHub的项目,打开您的项目,点击管理标签(或直接浏览 https:// github .com /用户名/项目名称/编辑),并在页面底部点击删除此版本库。它会要求你确认这一点,然后它就没有了。

If you are asking about deleting a project from GitHub, open your project, click the "Admin" tab (or browse directly to https://github.com/username/project_name/edit) and on the bottom of the page, click "Delete This Repository". It'll ask you to confirm this, and then it's gone.

如果你只是想删除你的一部分版本库,你需要将它添加到你的git版本库并推送到GitHub。

If you just want to erase a part of your repository, you need to do it to your git repository and push it to GitHub.

GitHub写了关于这个的说明。我自己并没有尝试过这个,所以我不能指导你进一步,但你可能可以在这里自己管理它。

GitHub has written a howto about this in their FAQ. I Haven't tried this myself, so I can't guide you further, but you probably can manage this yourself here on.

在任何一种情况下,不会删除任何第三方拉 - 如果有人在删除之前已经拉动了存储库,那么它就没有了,而且你没有办法做很多事情(除了尝试漂亮的请求技术之外)。

In either case, this, naturally, doesn't delete any third party pulls – if someone has pulled the repository before you deleted it, it's out, without you being able to do much about it (other than trying the "pretty please"-technique).

这篇关于从GitHub中删除代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆