Web界面像GitHub垃圾收集悬挂远程Git提交,如果不是可以获取它们? [英] Do web interfaces like GitHub garbage collect dangling remote git commits, and if not is it possible to fetch them?

查看:152
本文介绍了Web界面像GitHub垃圾收集悬挂远程Git提交,如果不是可以获取它们?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有关Git dangling的问题在GitHub和BitBucket之类的系统上提交:



这些系统是否垃圾收集,这样悬而未决的提交最终会被删除? (我知道它们对其他回购用户不利,我只是在探索假设)



有没有办法获取/克隆远程回购站,以便这些提交包括(即获得它包含的所有提交的完整副本)?我试过这个,但是我没有得到分离的提交,我想我错过了一个开关。

那些将不会是分离HEAD: 分离HEAD b 您希望看到 是当您检查不是分支的ref时。 //git-scm.com/docs/git-reflogrel =nofollow noreferrer> reflogs ,但据我所知,这些都是无法访问的。并且reflog不会被克隆。

另请参阅 git可以查看远程的reflog吗?


Questions about Git dangling commits on systems like GitHub and BitBucket:

Do these systems garbage collect, so that dangling commits would eventually get removed? (I know they are bad for other repos users, I'm just exploring what-ifs)

Is there a way to fetch/clone the remote repos so these commits are included (ie get a full copy of all commits it contains)? I've tried this but I don't get the detached commits, I guess I'm missing a switch.

解决方案

Those wouldn't be "detached HEAD": a detached HEAD is when you check a ref which isn't a branch.

You would like to see reflogs from a GitHub remote repo, but as far as I know, those are not accessible. And reflogs don't get cloned.
See also "git can I view the reflog of a remote?"

这篇关于Web界面像GitHub垃圾收集悬挂远程Git提交,如果不是可以获取它们?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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