-
-
Save tgkprog/8e2a0a88e8f2c4428f20a726affa0d3e to your computer and use it in GitHub Desktop.
Git Maintenance Commands
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Verifies the connectivity and validity of the objects in the database | |
git fsck —unreachable | |
# Manage reflog information | |
git reflog expire —expire=0 —all | |
# Pack unpacked objects in a repository | |
git repack -a -d -l | |
# Prune all unreachable objects from the object database | |
git prune | |
# Cleanup unnecessary files and optimize the local repository | |
git gc —aggressive |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment