Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

So basically I have an Android Studio project on my local computer and I need to add it into my BitBucket repository I created online. I just can't get it right with Android Studio. I can't upload files from Android Studio project to my BitBucket repository.

How can I do such a thing?

like image 956
Muhamed Krlić Avatar asked Sep 30 '13 16:09

Muhamed Krlić


People also ask

How do I Import a project into Android Studio?

Launch Android Studio, and click File > New > Import Project. Locate your project directory, click the build. gradle file you created above to select it, and then click OK to import your project.

How do I clone a Bitbucket project in Android Studio?

You can try below steps to clone a bitbucket repo: VCS -> Git -> clone -> paste bitbucket URL repo -> clone. It can clone successfully. Save this answer.


2 Answers

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

like image 178
Abdelrahman Aly Avatar answered Sep 22 '22 17:09

Abdelrahman Aly


Heres is what i did without plugins

Already have a project in Android Studio

1- Create the repository on your Bitbucket account

2- In Android Studio, Go to VCS

3- Choose 'Enable version control'

4- Choose Git and press OK

5- Right click on your project, choose Git then click Add

6- Go to VCS -> Commit Changes

7- Uncheck 'Perform Code Analysis'

8- Press Commit and Push in the Commit button

9- A new window will open, on the left press the DEFINE REMOTE link

10- Go to your Bitbucket repository Overview

11- Click on 'I have an existing Project'

12- Copy the link from bitbucket to the URL tab in the Define Remote Window ,e.g. '[email protected]:username/project.git' without the 'git remote add origin...' (maybe it will ask you for a password of your bitbucket account), press Ok

13 Press Push, and it's done

like image 28
borissoto Avatar answered Sep 22 '22 17:09

borissoto