AndroidAndroid Studio

How to push project source code to BitBucket repository from Android Studio

Hi Guys, In this post, I’ll give details about push project source code to Bitbucket repository from Android Studio.

When you started working on a project in Android Studio, you may want to store the project code to safe remote server. For this purpose its recommended to use Bitbucket repository system. Which will allow you to create repository and push all source code safely. Important feature it’ll provide you all Git features with Project management system. So you can create Multiple branches and Tags and manage your source code safely even with multiple developers working on a same project.

You need to have BitBucket Login for creating new repository, If you not have you can create a Bitbucket login here. After creating Account, Login to BitBucket website and Create a new repository. And get the link for new repository. It’ll be used in Android Studio later.

Ok, Now Open Android Studio with your project source code. Go through the below steps to Push project.

In Android Studio, Go to VCS menu -> Select Enable Version Control Integration…

project source code

You’ll see Popup to select version Control System. here select Git and click OK.

You’ll see your Project files changes to orange colour.

Now right click Project, it will display a menu. Goto Git->Select Add

After clicking on Add, Project files will change to green colour

Now Again right click on Project and in menu Go to Git-> Select Commit Directory…

It’ll display a Commit Changes dialog, Enter your Commit Message and click Commit.

Now right Click on Project Source Code, in menu Go to Git-> Select Repository -> and then Select Push… or else you can type shortcut keys Ctrl+Shift+K .

You’ll Push Commits dialog, In this dialog you’ll see master –> Define Remote.

Click on Define Remote, It’ll display a Define Remote dialog. In this dialog paste the URL(that is taken in Bitbucket after creating repository). And click OK.

It’ll show all the Committed files and message you entered before when committing directory. Now Click on Push. It’ll push all code files to Bitbucket repository.

Now if you go to bitbucket website in a browser and open your repository and refresh it. You’ll see project source code pushed safely to your repository.

That’s it.

Hope it helps somebody.

💡

You may also interested in

9 thoughts on “How to push project source code to BitBucket repository from Android Studio

  1. Blog is great for Mac, a few extra steps at the beginning.
    1. Download git… . exe
    2. Menu File/Settings/Git Set the path to get executable (probably C:\Program Files\Git\bin\git.exe

    Then… Enable version control and pick Git

Leave a Reply

Your email address will not be published.