从GitHub删除分支的仓库 - Go语言中文社区

从GitHub删除分支的仓库


本文翻译自: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 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. 如果我转到GitHub上的管理面板,则有一个删除选项。 If I delete it as the option above, will it make any effect in the original one or not? 如果将其作为上述选项删除,它是否会对原始文​​件生效?

I'd like to delete it. 我想删除它。 By now I'm just studying the code and don't really need the fork. 到目前为止,我只是在研究代码,实际上并不需要分叉。


#1楼

参考:https://stackoom.com/question/lQKd/从GitHub删除分支的仓库


#2楼

Deleting it will do nothing to the original project. 删除它对原始项目无济于事。 Editing it will only edit your fork on your repo page. 编辑它只会在回购页面上编辑您的fork。


#3楼

By far the easiest way is to log in gitHub account: 到目前为止,最简单的方法是登录gitHub帐户:

  1. Click to your repository {for example yourUsername/yourRepository for example mbaric/test } 点击进入您的存储库{例如,例如yourUsername / yourRepository,例如mbaric/test }
  2. Then in the main toolbar of github click on Settings 然后在github的主工具栏中单击设置
  3. Scroll to the bottom of the page to the section called Danger Zone and you will find Delete this repository button 滚动到页面底部到危险区域 ,您将找到删除此存储库按钮
  4. When you click it another pop up will appear here you need to type in the name of your repository and 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… 如果您在执行此操作时遇到麻烦,请检查以下图像...

2018-08-21 - Here are NEW images. 2018-08-21-这是新图像。 Enjoy. 请享用。 GHD1


GHD2
GHD3



#4楼

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. 如果我转到GitHub上的管理面板,则有一个删除选项。 If I delete it as the option above, will it make any effect in the original one or not? 如果将其作为上述选项删除,它是否会对原始文​​件生效?

It wont make any changes in the original one; 它不会对原始版本进行任何更改; cos, its your repo now. cos,现在是您的仓库。


#5楼

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. 通常,这就是开源组织所做的。


#6楼

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. 或其他熟悉的方法。

版权声明:本文来源CSDN,感谢博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。
原文链接:https://blog.csdn.net/w36680130/article/details/105616793
站方申明:本站部分内容来自社区用户分享,若涉及侵权,请联系站方删除。
  • 发表于 2021-05-30 11:25:33
  • 阅读 ( 1054 )
  • 分类:Go开源项目

0 条评论

请先 登录 后评论

官方社群

GO教程

猜你喜欢