android - 如何将我的 Eclipse Android 项目上传到 GitHub?

标签 android eclipse github repository project

我在我的 Eclipse 工作区中设置了一个 Android 项目。如果这个单独的项目可以在它自己的 Git 存储库中设置,我会喜欢。我之前尝试过这样做,但我最终得到了一个巨大的文件,因为我所有的工作区项目都在这个 repo 上结束了。当我将我的 APK 上传到 Google Play 商店时,这导致了问题。 (大约是 20MB 而不是 2MB)。

关于我如何能够做到这一点有什么想法吗?感谢您的帮助。

最佳答案

你显然把你的整个工作区都变成了一个 git 仓库

  1. 删除/备份你的仓库(workspace/.git 文件夹)
  2. 转到 github 并创建一个新的 repo - 假设你将它命名为 my-project
  3. 安装 msysgit .您迟早要使用它
  4. 右键单击您的项目文件夹并选择此处的 Git Bash
  5. 问题

    $ 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/

相关文章:

GitHub 克隆错误 : Cannot clone with EOF error

android - 通过 intents 传递大量数据时崩溃 - extras 包是否有大小限制?

android - Android中的ANR和崩溃有什么区别?

java - 类 'javax.persistence.Convert' 必须位于所选库中

java - 尝试将 Java 8 项目方面添加到 Eclipse Neon Mac

Android Volley : comes with a . gitignore

Java SSL 连接返回先前的回复

java - Android 中通过 TCP 进行实时音频流传输

java - eclipse中关于package和import关键字的令人困惑的说法

c - 在 OS X 和 Linux 下使用 automake 构建 C