git 从 GitHub 中删除分叉的 repo

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/11302639/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 14:04:12  来源:igfitidea点击:

Delete forked repo from GitHub

gitgithub

提问by axcdnt

I'm starting with git and GitHub and there's a project I'm watching on GitHub. I unintentionally clicked to fork it. Now it appears as a new project to me.

我从 git 和 GitHub 开始,我正在 GitHub 上观看一个项目。我无意中点击了它。现在它对我来说是一个新项目。

I have some doubts about it:

我对此有一些疑问:

  • I know if commit or do another thing to my forked repo, it will be updated, but the updated code will take effect only after the project's author request the pull. Right?
  • If I go to admin panel on GitHub there's a delete option. If I delete it as the option above, will it make any effect in the original one or not?
  • 我知道如果对我的分叉 repo 提交或做其他事情,它会被更新,但更新后的代码只有在项目作者请求拉取后才会生效。对?
  • 如果我去 GitHub 上的管理面板有一个删除选项。如果我把它作为上面的选项删除,它对原来的有什么影响吗?

I'd like to delete it. By now I'm just studying the code and don't really need the fork.

我想删除它。到目前为止,我只是在研究代码,并不真正需要 fork。

采纳答案by Conner

Deleting it will do nothing to the original project. Editing it will only edit your fork on your repo page.

删除它不会对原始项目产生任何影响。编辑它只会在你的 repo 页面上编辑你的 fork。

回答by Matija

By far the easiest way is to log in gitHub account:

到目前为止,最简单的方法是登录 gitHub 帐户:

  1. Click to your repository for example yourUsername/yourRepositoryfor example mbaric/zpropertyz.
  2. Then in the main toolbar of github click on Settings
  3. Scroll to the bottom of the page to the section called Danger Zoneand you will find Delete this repository button
  4. When you click it another pop upwill appear here you need to type in your github username and the name of your repositoryin this format gitHubUsername/nameOfTheRepositoryand click on the button below which says: I understand the consequences, delete the repository
  5. If you are having trouble to do it, below are the images that can be checked…
  1. 例如yourUsername/yourRepository,单击您的存储库mbaric/zpropertyz
  2. 然后在github的主工具栏中点击设置
  3. 滚动到页面底部到名为Danger Zone的部分,您将找到删除此存储库按钮
  4. 当你点击它时,另一个弹出窗口会出现在这里你需要以这种格式输入你的 github 用户名和你的存储库的名称,gitHubUsername/nameOfTheRepository然后点击下面的按钮,上面写着:我理解后果,删除存储库
  5. 如果您在操作时遇到困难,以下是可以检查的图像……

2020-01-15 - Here are images. Enjoy.GHD1

2020-01-15 - 这是图片。享受。GHD1



GHD2GHD2

GHD3GHD3

GHD4GHD4



回答by Prashanth Sams

Just delete the forked repo from your GitHub account.

只需从您的 GitHub 帐户中删除分叉的存储库。

https://help.github.com/articles/deleting-a-repository/

https://help.github.com/articles/deleting-a-repository/

  • If I go to admin panel on GitHub there's a delete option. If I delete it as the option above, will it make any effect in the original one or not?
  • 如果我去 GitHub 上的管理面板有一个删除选项。如果我把它作为上面的选项删除,它对原来的有什么影响吗?

It wont make any changes in the original one; cos, its your repo now.

它不会对原来的做任何改变;cos,它现在是你的回购。

回答by aravindkanna

There will not be any harm deleting the forked repositories. You can again fork that. It won't change the original code. The flow is like this...

删除分叉的存储库不会有任何危害。你可以再次分叉。它不会改变原始代码。流量是这样的……

1) You fork a repository. Just think of this as another copy of code which you can access or make changes to. The url of this repository will be of the form https://github.com/your-user-name/original-repo.

1)您分叉了一个存储库。只需将其视为您可以访问或更改的另一个代码副本。此存储库的 url 格式为https://github.com/your-user-name/original-repo.

2) You make some changes to that in your local machine and push them. Now the copy you created will be updated, but not the original one from which you have forked your repo.

2)您在本地机器上对其进行一些更改并推送它们。现在您创建的副本将被更新,但不会更新您从中分叉的原始副本。

3) If you want the changes you added to your forked repo to be applied to original repo(this may be helpful to the people who are organizing the repo) then you have to create a pull requestwhich you can do through UI. Then if they like your contribution, they will mergethat with their code.

3)如果您希望将添加到分叉存储库的更改应用于原始存储库(这可能对组织存储库的人员有所帮助),那么您必须创建一个pull request可以通过 UI 执行的操作。然后,如果他们喜欢你的贡献,他们会merge用他们的代码。

Generally this is what open source organizations do.

通常这就是开源组织所做的。

回答by Gurjot Singh

Sweet and simple:

甜美而简单:

  1. Open the repository
  2. Navigate to settings
  3. Scroll to the bottom of the page
  4. Click on delete
  5. Confirm names of the Repository to delete
  6. Click on delete
  1. 打开存储库
  2. 导航到设置
  3. 滚动到页面底部
  4. 点击删除
  5. 确认要删除的存储库的名称
  6. 点击删除

回答by Prateek Chanda

Deleting your forked repository will not affect the master(original) repository.

删除分叉存储库不会影响主(原始)存储库。

Like I have shown an example by deleting a forked repo

就像我通过删除分叉回购展示了一个例子

This is my forked repo (Image)

这是我的分叉回购(图片)

Deleting the forked repo

删除分叉的repo

And no changes to the original repository.

并且对原始存储库没有任何更改。

The master repo is something like an original one.

主存储库类似于原始存储库。

Forking is same as creating a xerox copy of the original one. Even if you get your xeroxed paper damaged, will it be that the original document also gets damaged. Obviously No.

分叉与创建原始副本的复印副本相同。即使您的复印纸损坏,原始文档也会损坏吗?显然不是。

So its the same as that.

所以它是一样的。

Hope this helps.

希望这可以帮助。

回答by Nilavarasi Ashika

select project to delete->settings->buttom click delete button->enter name of the repositories

选择要删除的项目->设置->按钮单击删除按钮->输入存储库名称

回答by Ashik Azeez

Select repo->Settings->(scroll down)Delete repo

选择repo->Settings->(向下滚动)删除repo

回答by Sagar Kulkarni

Answer is NO. It won't affect the original/main repository where you forked from. (Functionally, it will be incorrect if such an access is provided to a non-owner).

答案是否定的。它不会影响您分叉的原始/主存储库。(在功能上,如果向非所有者提供此类访问权限将是不正确的)。

Just wanted to add this though.

虽然只是想添加这个。

Warning: It will delete the local commits and branches you created on your forked repo. So, before deleting make sure there is a backup of that code with you if it is important.

警告:它将删除您在分叉存储库上创建的本地提交和分支。因此,在删除之前,请确保有该代码的备份(如果它很重要)。

Best way would be getting a git backup of forked repo using:

最好的方法是使用以下方法获取分叉回购的 git 备份:

git bundle 

or other methods that are familiar.

或其他熟悉的方法。

回答by Bruno Maia

No, it will not affect your original repository, just make sure that the repo address looks like "youGitName/TheRepository" and not like "OtherPersonGitName/TheRepo".

不,它不会影响您的原始存储库,只需确保存储库地址看起来像“youGitName/TheRepository”而不是“OtherPersonGitName/TheRepo”。