Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Add Linux Executable Files to .gitignore?

How do you add linux executable files to .gitignore without giving them an explicit extension and without placing them in a specific or /bin directory? Most are named the same as the C file from which they were compiled without the ".c" extension.

like image 729
haziz Avatar asked Nov 23 '11 05:11

haziz


2 Answers

Can you ignore all, but source code files?

For example:

* !*.c !Makefile 
like image 73
Havok Avatar answered Sep 28 '22 22:09

Havok


I would explicitly put them in the project .gitignore. It's not elegant, but I imagine your project doesn't have that many of them.

like image 31
Ben Avatar answered Sep 28 '22 21:09

Ben