
Now paste this inside your android studio terminal and hit enter.
This url will be different for your repository, so make sure to copy the right url from your repository. This command will be used in our android studio terminal to connect your local repo with the remote repo that we just created. ", which is the unique link to your remote repo. Copy the command that starts with " git remote add origin. Unique link to your github remote repo(highlighted with red marker) Once the repository has been created successfully, it will bring up a screen like shown below. Private repositories were a paid feature in github before, but now it has been made free, thanks to github!
When made public, it can be accessed by anyone across the globe whereas private repositories can be accessed only by select individuals whom you choose to share it with. You can either make your repository "public" or "private" as well.
Click on "new repository" and enter the details to complete repository creation. For github, login with your account and click on the plus button at the top right corner which brings up an option "new repository". If you don't have git installed, you will be getting a message like "command not found", in that case go here >. For mac users first of all go to your terminal and check if git is already installed by typing the command git -version , if you get a version value like shown below you already have git installed and you are good to go. We will be breaking down the tutorial into the following steps :Ģ) Create an account on github/bitbucket and then save the credentials to your git configurationģ) Create a remote git repository using github/bitbucket.Ĥ) Create an android studio project and initialise git within the project.ĥ) Add the remote repository as the origin of your android studio project.Ħ) Commit and push your code into remote repository(github/bitbucket) Repository hosting services like github, bitbucket etc are used for version control using git. Git is basically a distributed version control system for tracking changes in source code during software development.
We will be showing how to setup git using both github and bitbucket.
Hi guys! In this tutorial we will see how to work with git in android studio.