Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to ignore a particular executable file using .gitignore?

Suppose I get myProgam executable file on Mac as a result of compiling my code like this:

 gcc -o myProgram myProgram.c

How can induce my .gitignore file to actually ignore the myProgram file? I'm not looking for the solution where I make a separate folder for my executable files.

My question might seem obvious to many but I cannot actually find any solution online although I've searched a few pages and tutorials already as well as the StackOverflow resources.

I'll be grateful for any hints.

like image 700
Mateusz Piotrowski Avatar asked Oct 19 '25 03:10

Mateusz Piotrowski


1 Answers

Add

myProgram

on a separate line in your .gitignore file

like image 163
Alik Avatar answered Oct 20 '25 19:10

Alik