Aleksejs Fomins
Aleksejs Fomins

Reputation: 900

Git complains about "trailing whitespace" and "tab before indent" after it has been removed

I am working on a large project with a git repository. It is picky, so every time I push something it complains about white spaces and tabs. But this time, after I have manually made sure that the file I am uploading does not have tabs, the message after git commit does not change

git commit

sth/sth-else.hh:81: space before tab in indent.

do I need to refresh git somehow to notice that the file was changed?

Upvotes: 1

Views: 4005

Answers (1)

bperson
bperson

Reputation: 1335

You need to restage those files, via git add or git commit -a (though I would not recommend the latter for other reasons).

edit : found it \o/ the first paragraph of that answer explains why git commit -a isn't the best choice :)

Upvotes: 2

Related Questions