0

I am developing my Android app on Eclipse. It works fine and run properly. But, I want to migrate to Android-Studio. Here is what I am doing:

  1. Create a repo in GitHub with .gitignore, a README.md and LICENSE files
  2. From within my project folder run the following commands:

    • git init
    • git add .
    • git pull git-url master
    • git init (again)
    • git add . (again)
    • git commit -m "First commit"
    • git remote add origin git-url
    • git push -u origin master
  3. From Android-Studio, I checkout the project from Git

  4. Run the app from Android-Studio (after alot of configrations)

My concern is that ALL my project files and folders are pushed to the remote repo at GitHub, including for example: bin\ and .settings\ folders. Meanwhile, I only need to push the important and platform independenet files because I work in both windows/mac systems and in differnet locations (hence, this is the reason behind using version-control).

My questions are:

  1. How to pull the files on GitHub first, and then use .gitignore to push the "important and platform independenet" files from my project folder into GiHub
  2. What is the recommended method to export a project from Eclipse to Android-Studio while using GitHub ?! should I:
    • checkout the project from Git (as I am doing now) ?
    • use Eclipse Export Tool ?
    • or clone the project first into a directoty and then loaded into Android-Studio as an existing project ?
McLan
  • 2,552
  • 9
  • 51
  • 85

1 Answers1

0
  • You can pull your files by git pull origin master command from GitHub.
  • Add the name of the directory/file in .gitignore file you don't want to push. see more
  • You can clone the project first into a directory then load it in Android-Studio.
Community
  • 1
  • 1
Sajib Khan
  • 22,878
  • 9
  • 63
  • 73