【问题标题】: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

    1. 删除/备份您的存储库(工作区/.git 文件夹)
    2. 去 github 并创建一个新的 repo - 说你把它命名为my-project
    3. 安装msysgit。您迟早要使用它
    4. 右键单击您的 项目 文件夹并选择 Git Bash here
    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
      

    完成

    【讨论】:

      猜你喜欢
      • 2013-07-07
      • 1970-01-01
      • 2020-03-06
      • 2019-05-13
      • 2021-06-05
      • 2011-10-04
      • 2018-08-16
      • 2013-12-17
      • 1970-01-01
      相关资源
      最近更新 更多