Skip to content

Instantly share code, notes, and snippets.

@hsanchez
Forked from mbbx6spp/GIT-FSCK.adoc
Created February 1, 2016 18:42
Show Gist options
  • Select an option

  • Save hsanchez/14d8327a9a083bc4e55b to your computer and use it in GitHub Desktop.

Select an option

Save hsanchez/14d8327a9a083bc4e55b 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.

@gsnedders
Copy link

Note that both fetch.fsckobjects and receive.fsckobjects default to transfer.fsckobjects per the manual: hence you only need to set transfer.fsckobjects.

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