Jump to content

Nothing modified, but git says so


Recommended Posts

  • 41 years later...

I'm having a problem on my mangos-zero repo. For whatever reason, git constantly says the same files (mostly VS related) are modified, when they haven't been touched. Commiting the "changes" doesn't change it. I've tried this on a linux VM as well with a clean copy and the same problem happens.

This is the problem repo: https://github.com/Patman64/zero

Any ideas?

Link to comment
Share on other sites

  • 1 month later...
  • 7 months later...

I believe the old MaNGOS Lighthouse page used to have a Git configuration guide, now archived as a sticky in this forum section, that suggested the autocrlf = false setting and some others.

There is one not included, but has saved me a lot of merging headaches. You might also wish to set your config to auto-resolve certain whitespace issues.

By default, Git is set to only warn on trailing-space and space-before-tab. You can enable it to look out for indent-with-non-tab and

cr-at-eol, using git config --global core.whitespace \\trailing-space,space-before-tab,indent-with-non-tab.

git config --global core.whitespace fix to have Git strip spaces at EOL and correct superfluous spaces like space before tab. Will still throw other spacing errors, depending on your core config settings.

or, alternatively

git config --global core.whitespace ignore-all-space to set git to ignore all spaces, regardless of their placement.

You may disable the other whitespace settings in config by prefixing them with a dash "-" after the comma separating the arguments or simply deleting the argument.

You could also specify which directories in a repo should ignore whitespace for all files by placing * -whitespace in the gitattributes file of that particular directory. This can come in handy when you don't wish Git to ignore whitespace for files in another given directory, such as text files. You can also replace the asterisk with specific filenames or extensions.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use