Conversation

uhhhh chat
how do i remove a mistake from git history
i committed a big tarball yesterday and now its stuck in history

EDIT: GIT-FILTER-REPO!!!!

2
3
0
@thing I believe git-filter-repo can do this
1
0
0
@thing or if it's only in one commit so far you can do it manually with git rebase -i, picking the right commit, then git commit --amend (or git history fixup if you are using a new enough version of git)
1
0
0

@noisytoot okay did it
but uh
is the repo size still being big normal neobot_woozy

1
0
0
@thing git gc. unreferenced commits are not immediately automatically deleted
1
0
0

@noisytoot okay uh
i picked the commit using git rebase -i, picking, amend commiting. and then git gc. still big :(

1
0
0

@thing ok, I think it’s still being referenced by git reflog. try git reflog expire --expire-unreachable=now --all followed by git gc --prune=now

0
0
0