In one of our Git repositories, hosted by Gerrit code review system, I found a
lot of files named like “incoming_XXXXXXXXXXXXXX.pack”. Each of these files was
huge and was created by “git push” where a commit contained a huge binary file
(about 300MB). The push failed and the user retried several times. However,
the temporary incoming pack wasn’t cleaned by JGIt.
While we managed to remove the huge binary from the history (using git
filter-branch), I couldn’t find a legal way to remove these incoming packs.
Neither “git gc” nor “git prune” removed them.
Would it be safe to simply delete these files in the file system?
Is there a git way to get rid of them?