【问题标题】:How can I upload my Eclipse Android project to GitHub?如何将我的 Eclipse Android 项目上传到 GitHub?
【发布时间】:2013-07-29 18:52:42
【问题描述】:
我在我的 Eclipse 工作区中设置了一个 Android 项目。如果这个单独的项目可以设置在它自己的 Git 存储库中,我会想要什么。我之前尝试过这样做,但我最终得到了一个巨大的文件,因为我所有的工作区项目都在这个 repo 上结束了。当我将我的 APK 上传到 Google Play 商店时,这导致了问题。 (大概是 20MB 而不是 2MB)。
关于我将如何做到这一点的任何想法?感谢您的帮助。
【问题讨论】:
标签:
android
eclipse
github
repository
project
【解决方案1】:
你显然把你的整个工作区变成了一个 git repo
- 删除/备份您的存储库(工作区/.git 文件夹)
- 去 github 并创建一个新的 repo - 说你把它命名为
my-project
- 安装msysgit。您将迟早要使用它
- 右键单击您的 项目 文件夹并选择 Git Bash here
-
问题
$ 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
完成