#1154 Please run git gc for Spacewalk git repo
Closed: Fixed None Opened 15 years ago by adelton.

Hello,

please run git gc in the Spacewalk git repo.

I've recently pushed something to that git repo which should not have been pushed. While I've already deleted the references, the objects itself are still there. I hope just git gc will resolve the issue, if not, we might need to do more pruning.

Thank you,

Jan Pazdziora


Completed.

{{{

[root@hosted1 spacewalk.git]# git gc --aggressive
Counting objects: 76855, done.
Compressing objects: 100% (72237/72237), done.
Writing objects: 100% (76855/76855), done.
Total 76855 (delta 49912), reused 0 (delta 0)
[root@hosted1 spacewalk.git]# du -sh .
320M .
[root@hosted1 spacewalk.git]#
}}}

Thank you. Unfortunately, the objects I was planning to remove by that gc are still there, presumably because they are in the reflog and/or packed.

Please, run the following three commands on the Spacewalk git repo:

git reflog expire --expire-unreachable='2 hours' --all
git repack -A
git prune

These are steps that I've verified on my local checkout and they should achieve the goal.

Thanks,

Jan Pazdziora

Ouch, I should have previewed -- presumably one newline character is not enough. The commands are

git reflog expire --expire-unreachable='2 hours' --all

git repack -A

git prune

Thank you, Jan

All done

{{{
[root@hosted1 ~]# cd /srv/git/spacewalk.git/
[root@hosted1 spacewalk.git]# git reflog expire --expire-unreachable='2 hours' --all
[root@hosted1 spacewalk.git]# git repack -A
Counting objects: 76855, done.
Compressing objects: 100% (22325/22325), done.
Writing objects: 100% (76855/76855), done.
Total 76855 (delta 49912), reused 76855 (delta 49912)
[root@hosted1 spacewalk.git]# git prune
[root@hosted1 spacewalk.git]#
}}}

Thank you.

While I still see the commit in question when I use git archive, git clone does not give it to me which is the most important.

Marking as resolved.

Login to comment on this ticket.

Metadata