{"id":169,"date":"2016-04-14T10:49:14","date_gmt":"2016-04-14T10:49:14","guid":{"rendered":"http:\/\/simon.aldrich.eu\/blog\/?p=169"},"modified":"2016-04-14T10:49:14","modified_gmt":"2016-04-14T10:49:14","slug":"git-pre-commit-dos-line-endings-crlf","status":"publish","type":"post","link":"https:\/\/simon.aldrich.cc\/blog\/2016\/04\/git-pre-commit-dos-line-endings-crlf\/","title":{"rendered":"Reject DOS line-endings at Git pre-commit"},"content":{"rendered":"<p>All *nix devs seethe with rage when DOS line-endings (CRLF) end up in your beautiful source code, right? If you use Git for your version control you&#8217;re in luck, use <a href=\"http:\/\/simon.aldrich.eu\/download\/pre-commit\/pre-commit\">this<\/a> local pre-commit hook to kick those CRLFs to the kerb before they can even make it into your local commit.<\/p>\n<p>Install by copying the <a href=\"http:\/\/simon.aldrich.eu\/download\/pre-commit\/pre-commit\">pre-commit file<\/a> to the .git\/hooks directory of your checkout. Ask your Windows using colleagues nicely to do the same.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>All *nix devs seethe with rage when DOS line-endings (CRLF) end up in your beautiful source code, right? If you use Git for your version control you&#8217;re in luck, use this local pre-commit hook to kick those CRLFs to the kerb before they can even make it into your local commit. Install by copying the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[7,5,6],"tags":[51,52,48,49,17,50,53],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p2Rw4E-2J","jetpack_sharing_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/simon.aldrich.cc\/blog\/wp-json\/wp\/v2\/posts\/169"}],"collection":[{"href":"https:\/\/simon.aldrich.cc\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/simon.aldrich.cc\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/simon.aldrich.cc\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/simon.aldrich.cc\/blog\/wp-json\/wp\/v2\/comments?post=169"}],"version-history":[{"count":2,"href":"https:\/\/simon.aldrich.cc\/blog\/wp-json\/wp\/v2\/posts\/169\/revisions"}],"predecessor-version":[{"id":171,"href":"https:\/\/simon.aldrich.cc\/blog\/wp-json\/wp\/v2\/posts\/169\/revisions\/171"}],"wp:attachment":[{"href":"https:\/\/simon.aldrich.cc\/blog\/wp-json\/wp\/v2\/media?parent=169"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/simon.aldrich.cc\/blog\/wp-json\/wp\/v2\/categories?post=169"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/simon.aldrich.cc\/blog\/wp-json\/wp\/v2\/tags?post=169"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}