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.

  • Share/Bookmark
This entry was posted in Coding. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>