Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@tgkprog
Last active May 23, 2016 17:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tgkprog/fc90c55b2dd2ce038f86b6917a068ade to your computer and use it in GitHub Desktop.
Save tgkprog/fc90c55b2dd2ce038f86b6917a068ade to your computer and use it in GitHub Desktop.
# 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
git repack -a -d -l
git gc —aggressive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment