1

I made an android studio project and I also have an empty Github repository already created where I am a contributor. How do I move my android studio project to this already created repository? I tried but I am not able to achieve this. Any ideas?

Thanks.

2 Answers 2

1

The simplest way to do that is not to bring your project into an existing git repository, but to bring git to your project.

At the root of your project:

  1. git init
  2. git remote add origin <url>, where <url> is your GitHub repository's URL.
  3. git branch --set-upstream-to origin/master to setup your default branch and remote.
1
  • Yes. I did it in the same way. Thank you so much.
    – Thomas
    Commented Aug 25, 2017 at 8:41
0

I managed to solve the problem. Instead of moving the project using android studio to an existing Github repository, I did it locally using the command line. The steps I followed are here. Now its perfect and further commits can be now done directly from the android studio.

Not the answer you're looking for? Browse other questions tagged or ask your own question.