【发布时间】:2011-06-12 19:16:58
【问题描述】:
我正在 Github 上为我的 Android 应用程序的源代码设置一个存储库。我正在使用带有 ADT 插件的 Eclipse。除了 src/、res/ 和 AndroidManifest.xml 中的所有内容之外,我还应该包括什么,以便任何想要使用源代码的人都可以轻松地开始使用 Eclipse?
【问题讨论】:
标签: android eclipse repository
我正在 Github 上为我的 Android 应用程序的源代码设置一个存储库。我正在使用带有 ADT 插件的 Eclipse。除了 src/、res/ 和 AndroidManifest.xml 中的所有内容之外,我还应该包括什么,以便任何想要使用源代码的人都可以轻松地开始使用 Eclipse?
【问题讨论】:
标签: android eclipse repository
您应该包括除bin-文件夹之外的所有内容(这可以由其他用户生成)。此外,如果您使用的是 Eclipse,则可能需要使用 eGit。
【讨论】:
在目录的根目录设置存储库(git init),您将避免考虑此类问题。只需添加 git status 每次您希望更新存储库并推送时显示的更改。 无论如何尽量不要包含 .class 文件 - 即它没有用,因为贡献者可以自己编译代码。
基本上:
cd yourproject
git init
git add . (or git status to check before what to add)
git commit -m 'this is an example of a commit'
git remote add origin git@github.com:username/yourprojectnameingithub.git
git push origin master
【讨论】:
如果你有一个 lib 目录(包括 .jar 文件),你也可以包含它。
【讨论】: