Skip to content

Instantly share code, notes, and snippets.

@nikeee
Forked from mbbx6spp/GIT-FSCK.adoc
Created October 11, 2017 10:21
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 nikeee/3126315a292588965f7cffb465d3e77a to your computer and use it in GitHub Desktop.
Save nikeee/3126315a292588965f7cffb465d3e77a 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