7. Git Tools
- 7.1 Revisions-Auswahl
- 7.2 Interactive Staging
- 7.3 Stashing and Cleaning
- 7.4 Ihre Arbeit signieren
- 7.5 Suchen
- 7.6 Rewriting History
- 7.7 Reset Demystified
- 7.8 Fortgeschrittenes Merging
- 7.9 Rerere
- 7.10 Debugging with Git
- 7.11 Submodules
- 7.12 Bundling
- 7.13 Replace
- 7.14 Anmeldeinformationen speichern
- 7.15 Zusammenfassung
10. Git Interna
- A3.1 Setup und Konfiguration
- A3.2 Projekte importieren und erstellen
- A3.3 Einfache Snapshot-Funktionen
- A3.4 Branching und Merging
- A3.5 Sharing and Updating Projects
- A3.6 Inspection and Comparison
- A3.7 Debugging
- A3.8 Patching
- A3.9 Email
- A3.10 External Systems
- A3.11 Administration
- A3.12 Plumbing Commands
A3.11 Appendix C: Git Kommandos - Administration
If you’re administering a Git repository or need to fix something in a big way, Git provides a number of administrative commands to help you out.
git gc command runs “garbage collection” on your repository, removing unnecessary files in your database and packing up the remaining files into a more efficient format.
This command normally runs in the background for you, though you can manually run it if you wish. We go over some examples of this in Wartung.
git fsck command is used to check the internal database for problems or inconsistencies.
We only quickly use this once in Datenwiederherstellung to search for dangling objects.
git reflog command goes through a log of where all the heads of your branches have been as you work to find commits you may have lost through rewriting histories.
We cover this command mainly in RefLog Kurzformen, where we show normal usage to and how to use
git log -g to view the same information with
git log output.
We also go through a practical example of recovering such a lost branch in Datenwiederherstellung.
git filter-branch command is used to rewrite loads of commits according to certain patterns, like removing a file everywhere or filtering the entire repository down to a single subdirectory for extracting a project.
In Removing a File from Every Commit we explain the command and explore several different options such as