我正在開發一款應用程序,該應用程序應該既可以在Android上運行,也可以在普通的Java SE上運行。Eclipse:將一個項目添加到另一個項目的構建路徑時如何忽略.git子目錄?
我有一個eclipse項目叫做foobar核心其中包含Android和SE版本使用的代碼。我有另一個項目叫做foobar-android,其中包含所有android特定的代碼。
我需要引用一些在foobar的,Android的項目foobar的核心碼的,所以我在設置中添加foobar的核心到foobar的,Android的 - > Java構建路徑 - >項目 - >構建路徑上的必需項目。這工作正常,因爲我可以使用代碼foobare核心在foobar-android現在。
這裏的問題:兩個foobar的核心和foobar的,Android的是獨立的Git倉庫,這意味着他們都有一個git的子目錄。現在當我編譯foobar-android時,我在「控制檯」選項卡上收到很多警告。它們看起來像這樣:
/foobar-core/src/.git/HEAD conflicts with another file already put at .git/HEAD
/foobar-core/src/.git/config conflicts with another file already put at .git/config
/foobar-core/src/.git/description conflicts with another file already put at > .git/description
/foobar-core/src/.git/hooks/applypatch-msg.sample conflicts with another file already > put at .git/hooks/applypatch-msg.sample
如何告知Eclipse在從foobar-core項目導入源時忽略.git文件?
謝謝,這實際上回答了這個問題,不像上面提到的使用.gitignore的'答案'。 – 2011-07-06 19:35:38
是的,我得到了一個'答案'以及:) – barrycburton 2011-07-07 22:27:04