Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should git ignore the *.pch files created by XCode?

Should I add *.pch files to .gitignore in XCode projects?

like image 432
cfischer Avatar asked Dec 01 '22 04:12

cfischer


1 Answers

No, you should not. It's not a generated file, you as a developer may (and should) modify it. The point is to put the most commonly used #import/#include directives in here. That will speed up compiling as Xcode will then precompile it and GCC will use these "cached" results when compiling other files without the need to parse and compile those includes over and over again.

I found the speedup to be especially dramatic with C++, BTW.

like image 110
DarkDust Avatar answered Dec 03 '22 23:12

DarkDust