可能重複:
gitignore without binary files如何讓.gitignore忽略沒有擴展名的編譯文件?
編輯:的gitignore without binary files
當你編譯,比方說,一個Haskell文件,(test.hs
),使用ghc --make test.hs
,結果是test.hi
杜佩和test
。我只想添加並提交源test.hs
,同時將test.hi
和test
保留在存儲庫之外,但與源文件位於同一目錄中。 test
是問題,我該如何指定.gitignore忽略沒有擴展名的已編譯文件?
'echo「* .a」>> .gitignore'並用'ghc --osuf a --make test.hs編譯' –
謝謝@Eric Wilson,我先搜索了一下,但沒有看到那個。 – Kurtosis
@KingCrunch,呵呵,是的,但我更喜歡懶惰的'git add。'如果可能。 – Kurtosis