1

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?

Jonathan Leffler
  • 730,956
  • 141
  • 904
  • 1,278
Aleksejs Fomins
  • 688
  • 1
  • 8
  • 20
  • If you change a file you have to stage the changes with `git add` so it will be committed with the next `git commit` command. – knittl Aug 05 '14 at 07:18
  • How did you fix this? Is there a `git` command or `unix` command that will fix these issues? – PatS Apr 13 '23 at 13:01

1 Answers1

2

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 :)

Community
  • 1
  • 1
bperson
  • 1,285
  • 10
  • 19