Browse files

.gitconfig: Explicitly disable `indent-with-non-tab`

Don’t use `indent-with-non-tab`. This config flag is PERNICIOUS. If turned on, Git won’t tell you that you indented your code incorrectly. Instead, when it is pushing your changes to your remote repo, Git will silently convert any consecutive 8-space strings it sees into tab characters. This can be highly undesirable, especially if you collaborate with a team that expects the code to be indented using spaces instead of tabs.

At the very least, the comment above this line should very clearly explain the fact that `indent-with-non-tab` does more than advertised in the `git-config man page (

Closes #351.
  • Loading branch information...
luveenw authored and mathiasbynens committed Mar 5, 2014
1 parent d4cfb80 commit c62ff1628bc3bb08aebb77d97dac026c8f17cf4f
Showing with 2 additions and 3 deletions.
  1. +2 −3 .gitconfig
@@ -42,12 +42,11 @@
# Use custom `.gitignore` and `.gitattributes`
excludesfile = ~/.gitignore
attributesfile = ~/.gitattributes
- # Treat spaces before tabs, lines that are indented with 8 or more spaces, and
- # all kinds of trailing whitespace as an error.
+ # Treat spaces before tabs and all kinds of trailing whitespace as an error.
# [default] trailing-space: looks for spaces at the end of a line
# [default] space-before-tab: looks for spaces before tabs at the beginning of
# a line
- whitespace = space-before-tab,indent-with-non-tab,trailing-space
+ whitespace = space-before-tab,-indent-with-non-tab,trailing-space
# Make `git rebase` safer on OS X
# More info: <>
trustctime = false

1 comment on commit c62ff16


This comment has been minimized.

Show comment Hide comment

samskiter Mar 7, 2014

Nice! I came here to report this 👍

Nice! I came here to report this 👍

Please sign in to comment.