Gkl
Gkl

Reputation: 33

Error in console fatal: cannot enforce both tab-in-indent and indent-with-non-tab

I get fatal: cannot enforce both tab-in-indent and indent-with-non-tab

error I get for all git commands like git branch, git checkout etc from intellij console.

I tried with git customizations and other git options from github but nothing worked

i/p: git branch response --> fatal: cannot enforce both tab-in-indent and indent-with-non-tab

Upvotes: 2

Views: 942

Answers (1)

user
user

Reputation: 977

This error means 2 conflicting options are set together:

indent-with-non-tab: highlights a line that is indented with spaces instead of tabs while tab-in-indent : highlights an initial tab indent as an error.

You can check your configuration using this command : git config core.whitespace

This will give you result something like indent-with-non-tab,tab-in-indent

You need to decide which option you want to use (you can use only one of them either treat tab as error or space as error). Then update your git configuration accordingly.

For example : git config --global core.whitespace tab-in-indent

Upvotes: 3

Related Questions