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

大城市里の小女人 提交于 2020-12-26 03:59:21

问题


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.


回答1:


Add

myProgram

on a separate line in your .gitignore file



来源:https://stackoverflow.com/questions/29803693/is-it-possible-to-ignore-a-particular-executable-file-using-gitignore

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!