首页 > 编程知识 正文

git删除文件夹命令,github删除远程仓库

时间:2023-05-03 13:11:23 阅读:160015 作者:2996

从Delete forked repo from GitHub翻译

I ' mstartingwithgitandgithubandthere ' saprojecti ' mwatchingongithub .我先从git和github开始,在github上看项目。 iunintentionallyclickedtoforkit .我不小心点击了那个。 Now it appears as a new project to me .现在对我来说是个新项目。

I have some doubts about it:我对此有点怀疑:

iknowifcommitordoanotherthingtomyforkedrepo,it will be updated, buttheupdatedcodewilltakeeffectonlyaftertheproject ' sauthorrequestthepull .我知道提交或做其他事情会更新派生的仓库,但是更新的代码是一个程序Right? 是吗? 导航到ifigotoadminpanelongithubthere ' sadeleteoption.github的管理面板时,会显示删除选项。 If I delete it as the option above,willitmakeanyeffectintheoriginaloneornot? 如果将其作为上述选项删除,对原始文件有效吗? I'd like to delete it .我想删除。 by nowi ' mjuststudyingthecodeanddon ' treallyneedthefork .到目前为止,我们只是研究了代码,实际上没有必要分支。

#1楼参考:删除从https://stack oom.com/question/lqkd/github分支的仓库

#2楼deletingitwilldonothingtotheoriginalproject .对原始项目没有任何帮助。 editingitwillonlyedityourforkonyourrepopage .编辑此属性将仅在回购页面上编辑fork。

#3楼byfartheeasiestwayistologingithubaccount :到目前为止,最简单的方法是登录github帐户:

单击clicktoyourrepository { for example your username/yourrepositoryforexamplembaric/test }以访问存储库。 例如yourusername/yourreporic}例如,mbaric/test } theninthemaintoolbarofgithubclickon 3http://www.Sina.com /以及gigingited ,滚动到scrolltothebottomofthepagetothesectioncalled 3358 www.Sina.com/andyouwillfind http://www.Sina.com /页面底部whenyouclickitanother http://www.Sina.com/willappearhereyouneedto http://www.Sina.com/andclickonthebuttonbelowhichsays 338 http://ww.sina.com/需要另一个http://,然后单击下面的按钮。 http://www.Sina.com/ifyouarehavingtroubletodoit,belowaretheimagesthatcanbechecked…如果在执行此操作时遇到故障,请检查以下图像

#4楼

Just delet

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

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。