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?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With