Git Aufräumen: Unterschied zwischen den Versionen
Erscheinungsbild
Die Seite wurde neu angelegt: „Massnahmen, um im Git-repo Platz zu schaffen. ==Unbenutzte Programmfiles von GIT löschen== git gc --aggressive ==Alte commits abschneiden== Workaround, um…“ |
Keine Bearbeitungszusammenfassung |
||
| Zeile 1: | Zeile 1: | ||
Massnahmen, um im | Massnahmen, um im GIT-Repo Platz zu schaffen. | ||
==Unbenutzte Programmfiles von GIT löschen== | ==Unbenutzte Programmfiles von GIT löschen== | ||
| Zeile 5: | Zeile 5: | ||
==Alte | ==Alte Commits abschneiden== | ||
Workaround, um alte | Workaround, um alte GIT-Commits aus dem Repository zu löschen. | ||
git checkout --orphan temp $1 #create a new branch without parent history | 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 commit -m "Truncated history" #create a first commit on this branch | ||
| Zeile 15: | Zeile 15: | ||
''Quelle:'' [https://stackoverflow.com/questions/4515580/how-do-i-remove-the-old-history-from-a-git-repository Stackoverflow: How do I remove the old history from a git repository?] | ''Quelle:'' [https://stackoverflow.com/questions/4515580/how-do-i-remove-the-old-history-from-a-git-repository Stackoverflow: How do I remove the old history from a git repository?] | ||
==Files aus der gesamten GIT-History löschen== | |||
https://help.github.com/articles/removing-sensitive-data-from-a-repository/ | |||
https://rtyley.github.io/bfg-repo-cleaner/ | |||
Aktuelle Version vom 9. Juni 2017, 08:20 Uhr
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?
Files aus der gesamten GIT-History löschen
https://help.github.com/articles/removing-sensitive-data-from-a-repository/