【发布时间】:2010-07-04 21:21:01
【问题描述】:
我正在开发一个应该在 Android 和常规 Java SE 上运行的应用程序。
我有一个名为 foobar-core 的 Eclipse 项目,其中包含 Android 和 SE 版本都使用的代码。我有另一个名为 foobar-android 的项目,其中包含所有特定于 android 的代码。
我需要引用foobar-android项目中的一些foobar-core代码,所以我在foobar-core中添加了foobar-core strong>foobar-android 在设置 -> Java 构建路径 -> 项目 -> 构建路径上的必需项目。这很好,因为我现在可以在 foobar-android 中使用来自 foobare-core 的代码。
问题来了:foobar-core 和 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
当从 foobar-core 项目导入源代码时,如何让 Eclipse 忽略 .git 文件?
【问题讨论】: