Skip to content

Instantly share code, notes, and snippets.

@mbbx6spp
Created February 1, 2016 15:12
Show Gist options
  • Save mbbx6spp/14b86437e794bffb4120 to your computer and use it in GitHub Desktop.
Save mbbx6spp/14b86437e794bffb4120 to your computer and use it in GitHub Desktop.
How to check your git object sanity

fsck-ing your Git objects by default

Yo developers (git interactive users), check if you are fsck-ing your objects on transfer:

git config --null --get transfer.fsckobjects
git config --null --get fetch.fsckobjects

If that is null or false, then …​ set it to true:

git config --global transfer.fsckobjects true
git config --global fetch.fsckobjects true

Administrators of git repositories you might want to check and setup your git repos on your servers by setting receive.fsckobjects to true:

# for each git repo on the server
git config --local receive.fsckobjects true

Cheers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment