Gitignore with a specific platform?

I am working on Fedora 22. When I run git status

, it lists all the files *.o

. I do not remember to see behavior in the past.

I have looked at the project file .gitginore

delivered via git clone

and it is missing a rule for *.o

. I would like to add *.o

, but I would only like to do this for non-Windows platforms. Windows uses *.obj

, so it is not needed. Also *.o

used for some programs in Windows (IIRC).

Can I specify *.o

for non-Windows platforms? If so, how?

+3


source to share


2 answers


I have done some research (one of the more credible sources was here ) and it looks like the files are .o

not used for anything other than software development where they are object files and should not be under version control.



Thus, there is no basis for versions .o

. Instead of trying to split the file .gitignore

per platform, I would ignore all files unconditionally .o

.

+1


source


Can I specify * .o for platforms other than Windows? If so, how?



Yes. Put *.o

in a personal file exclusions for any non-Windows users who generate them as strict detritus, or .git/info/exclude

in any repo that is used to work on it. I think the presumption is that people work on any platform with any development system and tools that know best what to ignore and what not, and probably have those on their personal list as well did not expect projects around the world to foresee future tool chains.

+1


source







All Articles