Fixing old gits

I've been working a project that used a very old git repo, and when I tried to run commit, I was greeted with this particular gem, over and over:


Git: You have some suspicious patch lines…
(endless whining about whitespace and tabs and other petty crap

This gets pretty tiresome, but fortunately, it's quite easy to fix. You can either run git commit with the --noverify flag, or for a more permanent fix, take by taking out the executable bit on the pre-commit hook like so:


cd .git/hooks/ # go to the directory where the git hooks are
chmod -x pre-commit #metaphorically speaking, take a crow bar its kneecaps

Mercifully, this little feat of silicon skullduggery is already done for you in more recent git versions, so you needn't dirty your hands.

Thanks Rob Wilkerson's, and Dan Klassen for this particular gem.



Copyright © 2020 Chris Adams
Powered by Cryogen
Theme by KingMob