我在我的 Eclipse 工作区中设置了一个 Android 项目。如果这个单独的项目可以在它自己的 Git 存储库中设置,我会喜欢。我之前尝试过这样做,但我最终得到了一个巨大的文件,因为我所有的工作区项目都在这个 repo 上结束了。当我将我的 APK 上传到 Google Play 商店时,这导致了问题。 (大约是 20MB 而不是 2MB)。
关于我如何能够做到这一点有什么想法吗?感谢您的帮助。
最佳答案
你显然把你的整个工作区都变成了一个 git 仓库
- 删除/备份你的仓库(workspace/.git 文件夹)
- 转到 github 并创建一个新的 repo - 假设你将它命名为
my-project
- 安装 msysgit .您将迟早要使用它
- 右键单击您的项目文件夹并选择此处的 Git Bash
问题
$ git init $ echo bin/ >> .gitignore # exclude the bin folder ! $ git add -A && git commit -m "All my files" # this will commit *all* # better fire up the gui and choose what to commit $ git remote add origin https://github.com/YOURUSERNAME/my-project.git $ git push -u origin master
完成
关于android - 如何将我的 Eclipse Android 项目上传到 GitHub?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17931923/