Tuesday, 15 June 2010

Garbage collect commits in git -



Garbage collect commits in git -

i have commits created git subtree want have garbage collect (more practical purpose understand , why can collected).

i have checked these commits not referenced next ways:

# in reflog > git reflog --all --no-abbrev-commit | grep <hash> (no output) # in branch, local or remote > git branch --contains <hash> (no output) > git branch -r --contains <hash> (no output) # in tag > git tag --contains <hash> (no output) # in current index > git rev-list head | grep <hash> (no output) # in references filter-branch > ls .git/refs/original/ (the folder not exist)

these place git gc documentation lists contain references.

still given commits still exist after git gc.

am missing something? or there git plumbing command checks references?

every time want delete loose objects, utilize next commands:

rm -rf .git/refs/original/* git reflog expire --all --expire-unreachable=0 git repack -a -d git prune

git

No comments:

Post a Comment