Very strange issue with git; local changes to file?

Need help running various source ports? Did your computer break? Ask here.

Moderators: GZDoom Developers, LZDoom Developers, UZDoom Developers

Forum rules
Please be as descriptive as possible in your posts (list your hardware and operating system, the version of the source port you are using, any mods you are running and how they're being loaded, etc.)
This will help others to give you a solution!
TiZ
Posts: 4
Joined: Mon Feb 27, 2017 8:17 pm

Very strange issue with git; local changes to file?

Post by TiZ »

Hiya. Just trying to do a local build of GZDoom on my Linux box that I can carry between distros. But I'm running into something weird trying to check out the tag for the latest stable release. I've cloned from git://github.com/coelckers/gzdoom.git, and when I try to checkout the tag, I get this:

Code: Select all

error: Your local changes to the following files would be overwritten by checkout:
	src/win32/zdoom.rc
Please, commit your changes or stash them before you can switch branches.
Aborting
This is even when I do git reset --hard followed by git clean -ffdx before trying to checkout. What is this file? What's its deal? Why won't git actually revert it?

I can get around it by doing git reset --hard $tag, but I thought I'd at least stop by and report it here in case it means there might actually be something wrong with the git state.
_mental_
 
 
Posts: 3820
Joined: Sun Aug 07, 2011 4:32 am

Re: Very strange issue with git; local changes to file?

Post by _mental_ »

In general, you can safely ignore this. It's caused by difference in line ending on Windows and other OSes, i.e. CR/LF vs. just LF.

To handle such things properly .rc extension should be added to .gitattributes file.
This won't help for already existing commits though, when someone needs to checkout one of them, like in your case.

Return to “Technical Issues”