Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make .gitignore ignore compiled files with no extension? [duplicate]

Tags:

git

gitignore

Possible Duplicate:
gitignore without binary files

Edit: Dupe of gitignore without binary files

When you compile, say, a Haskell file, (test.hs), using ghc --make test.hs, the result is test.hi and test. I only want to add and commit the source test.hs, while keeping test.hi and test out of the repository but in the same directory as the source file. test is the problem, how do I specify to .gitignore to ignore a compiled file with no extension?

like image 330
Kurtosis Avatar asked Sep 30 '11 20:09

Kurtosis


1 Answers

Just add the filename to your .gitignore file. For example:

$ git ls-files --other --exclude-standard
test
$ echo test > .gitignore
$ git ls-files --other --exclude-standard
$

.gitignore doesn't care about extensions. It just matches patterns.

like image 84
larsks Avatar answered Oct 20 '22 08:10

larsks