是否可以使用.gitignore忽略特定的可执行文件? [英] Is it possible to ignore a particular executable file using .gitignore?
问题描述
假设由于这样编译我的代码,我在Mac上获得了 myProgam
可执行文件:
Suppose I get myProgam
executable file on Mac as a result of compiling my code like this:
gcc -o myProgram myProgram.c
如何使我的 .gitignore
文件实际上忽略 myProgram
文件?我不是在寻找为可执行文件创建单独文件夹的解决方案.
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.
我的问题在很多人看来似乎很明显,但是尽管我已经搜索了几页和教程以及StackOverflow资源,但实际上我无法在线找到任何解决方案.
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.
推荐答案
添加
myProgram
.gitignore 文件中的另一行
on a separate line in your .gitignore
file
这篇关于是否可以使用.gitignore忽略特定的可执行文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!