
It is a good habit to push your changes regularly to the remote repository. With the Git context menu we can commit our changes to the local repository (remind you that these changes are not yet present on the server). At the right bottom of the Android Studio window, the branch is shown which is currently your active branch.‘feature/myfirstbranch’ and click the ‘OK’-button. Right-click the project, go to ‘Git – Repository – Branches…’ and choose ‘New Branch’.I have protected the develop-branch from pushing directly to it, so before we make any changes, we will create a feature-branch. In my case, the default branch is the develop-branch.

Now the git repository is cloned on your local machine, the default branch is checked out.If you have no projects open yet, you can choose for opening in a new window. A message is shown asking whether you want to open the project in the existing window or in the new window.A window will pop up where you have to fill in your git credentials, either the passphrase for your SSH key, or your user name and password to access the remote git repository.Choose the parent directory where you want to store the workspace on your hard drive and click the ‘Clone’-button.

The ‘Directory Name’ is automatically filled in. When you are using SSH, it is of the, when you are using HTTPS, it is of the form: . Copy the git repository url from your git server.Go to ‘File – New – Project from Version Control’ and choose Git.

As git hosting platform, I am using, but it will be the same procedure to follow from any other git hosting (or local) platform. In this post I will explain how you can get started with Android Studio 2.3.3 from an existing git repository.
