【发布时间】:2013-02-06 03:59:39
【问题描述】:
我有一些由git subtree 创建的提交,我想要进行垃圾收集(更重要的是任何实际目的,只是为了了解可以收集什么以及为什么可以收集)。
我已经检查过这些提交没有通过以下方式引用:
# In any reflog
> git reflog --all --no-abbrev-commit | grep <hash>
(no output)
# In any branch, local or remote
> git branch --contains <hash>
(no output)
> git branch -r --contains <hash>
(no output)
# In any tag
> git tag --contains <hash>
(no output)
# In the current index
> git rev-list HEAD | grep <hash>
(no output)
# In references from filter-branch
> ls .git/refs/original/
(the folder does not exist)
这些是git gc documentation 列出的可能包含引用的地方。
在git gc 之后仍然存在给定的提交。
我错过了什么吗?或者是否有任何 git 管道命令可以检查所有这些引用?
【问题讨论】:
标签: git