Git Aufräumen
Erscheinungsbild
Massnahmen, um im Git-repo Platz zu schaffen.
Unbenutzte Programmfiles von GIT löschen
git gc --aggressive
Alte commits abschneiden
Workaround, um alte Git-commits aus dem Repository zu löschen.
git checkout --orphan temp $1 #create a new branch without parent history git commit -m "Truncated history" #create a first commit on this branch git rebase --onto temp $1 master #now rebase the part of master branch that we want to keep onto this branch git branch -D temp #delete the temp branch git gc --aggressive # aggressively collect garbage; may take a lot of time on large repos
Quelle: Stackoverflow: How do I remove the old history from a git repository?