How to import a Project into bitbucket repository from Android Studio?

  • In the Android studio, go to VCS-> 'Enable version control'.

From dropdown menu select Git, then click OK.

  • Right click on your Project view in the Android Studio:

go to Git -> Add.

(All the files in the project should change the color, turned green probably)

  • Open Terminal in the Android studio.

From your empty repo in the Bitbucket page, copy from the paragraph "Step 2: Connect your existing repository to Bitbucket" the line :

git remote add origin https://<user>@bitbucket.org/<path>.git, then Enter.

Now type:

git commit -m "initial commit" (to commit all the files from the Project), then Enter.

Now type:

git push -u origin master (to push all the commited files to the master- or the other branch, just change "master" to other branch).

That's it. Your project is versioned and placed in your Bitbucket repo.


Here is how I did it without plugins:

  1. Create the repository on your Bitbucket account

  2. Create your project in Android Studio

  3. In Android Studio, Go to VCS

  4. Choose 'Enable version control'

  5. Choose Git and press OK

  6. Right click on your project, choose Git then click Add

  7. Open Terminal in Android Studio

  8. Go to your Bitbucket repository Overview

  9. Click on 'I have an existing Project'

  10. Copy the 'git remote add origin ... etc.' line to your terminal and press enter

  11. Click on 'Commit Changes', write your comment then press Commit and push

Also add the 'git push -u origin master' in the terminal at part 10 of above