Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I upload my Eclipse Android project to GitHub?

I have an Android project set up in my Eclipse workspace. What I would like would be if this individual project could be set up in its own Git repository. I tried to do this previously but I ended up having a huge file because all of my workspace projects ended up on this one repo. This caused problems when I uploaded my APK to the Google Play store. (It was something like 20MB instead of 2MB).

Any ideas as to how I would be able to do this? Thanks for any help.

like image 1000
colmulhall Avatar asked Jul 29 '13 18:07

colmulhall


1 Answers

You apparently made your whole workspace into a git repo

  1. Delete/backup your repo (the workspace/.git folder)
  2. Go to github and create a new repo - say you name it my-project
  3. Install msysgit. You will have to work with it sooner or later
  4. Right click on your project folder and choose Git Bash here
  5. Issue

    $ 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
    

Done

like image 113
Mr_and_Mrs_D Avatar answered Oct 04 '22 15:10

Mr_and_Mrs_D