社区微信群开通啦,扫一扫抢先加入社区官方微信群
社区微信群
本文翻译自:Delete forked repo from GitHub
I'm starting with git and GitHub and there's a project I'm watching on GitHub. 我先从git和GitHub开始,然后在GitHub上观看一个项目。 I unintentionally clicked to fork it. 我无意间点击了它。 Now it appears as a new project to me. 现在,它对我来说是一个新项目。
I have some doubts about it: 我对此有些怀疑:
I'd like to delete it. 我想删除它。 By now I'm just studying the code and don't really need the fork. 到目前为止,我只是在研究代码,实际上并不需要分叉。
参考:https://stackoom.com/question/lQKd/从GitHub删除分支的仓库
Deleting it will do nothing to the original project. 删除它对原始项目无济于事。 Editing it will only edit your fork on your repo page. 编辑它只会在回购页面上编辑您的fork。
By far the easiest way is to log in gitHub account: 到目前为止,最简单的方法是登录gitHub帐户:
mbaric/test
} 点击进入您的存储库{例如,例如yourUsername / yourRepository,例如mbaric/test
} 2018-08-21 - Here are NEW images. 2018-08-21-这是新图像。 Enjoy. 请享用。
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/
It wont make any changes in the original one; 它不会对原始版本进行任何更改; cos, its your repo now. cos,现在是您的仓库。
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. 1)您分叉一个存储库。 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
. 该存储库的URL的格式为https://github.com/your-user-name/original-repo
。
2) You make some changes to that in your local machine and push them. 2)您对本地计算机中的内容进行了一些更改,然后将其推送。 Now the copy you created will be updated, but not the original one from which you have forked your repo. 现在,您创建的副本将被更新,但不会更新您从中分叉存储库的原始副本。
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 request
which you can do through UI. 3)如果您希望将添加到叉式仓库中的更改应用于原始仓库(这对组织仓库的人员可能会有帮助),那么您必须创建一个pull request
,您可以通过UI进行此操作。 Then if they like your contribution, they will merge
that with their code. 然后,如果他们喜欢您的贡献,他们会将其与代码merge
。
Generally this is what open source organizations do. 通常,这就是开源组织所做的。
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. 或其他熟悉的方法。
如果觉得我的文章对您有用,请随意打赏。你的支持将鼓励我继续创作!