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.








How to debug project, Android Studio

Android Studio: Debug Project

This post is for beginners, to give basic understanding to debug project in Android Studio.

To debug Project, you have to place breakpoints at the code line, of a method or class, So the debugger will stop at that break point while debugging.
To place a break point just click on  work space left side border you can see red dot. To remove breakpoint just click on red dot again.


To debug a project from starting screen of your app, You have to click on the Debug menu button, or Press Shift+ F9

*generally, while debugging app slows down.

So, You can use another debug option to debug at a Specific Screen.
At times you may want to debug code in a Specific screen at a particular line for eg. on a Save button click event method.

So, Place a breakpoint at that particular onClick(View v) method.


And just run the app by clicking Run menu button


After running app on device or emulator, navigate to the Specific screen and just before clicking on Save button(button event where you want to debug code) in screen. Click on Attach debugger to Android Process menu button in Android Studio work space.


You’ll see¬†a dialog¬†to select a process, here select your process (and wait for a moment for debugger to attach to process) and now¬†click on the Save button in that Specific screen. You can see Debug console at the bottom and debugger waits at break point at a¬†specific line to enable you start debugging.

debug project

Here I just like to explain few useful debug console button functionalities

Press F8 or click on the below debug console button icon, to move debugger to next line.. and so on…


Press F7 or click on the below debug console button icon, to move debugger to in to a inner class method.(This is very rarely used). Use it whenever a method call is escaping from debugging.


Press F9 or click on the below debug console button icon, to execute code up to next break point..


Press Ctrl+F2 or click on the below debug console button icon, to stop debugger execution, when you click on this button, debugger stops execution and app runs normally.


these buttons are mainly used for debugging. If you understand these button functions first then You can see and understand other button functions easily.

You can see all variables data and instances data of Specific screen in Variable section…


Hope it makes sense and helps somebody.

cheers ūüôā

You may also interested in