Android Studio And Git Configuration - Day Four

Introduction

Today I am starting with the configuration of GIT version control system in Android studio because GIT is now a very popular version control system and it is useful for all developers, and GIT is a large platform for sharing your code.

Refer to the article series below:

GIT offers two types of accounts; one is private and other is public. The public account is free of cost and the private account has some charges.

Step 1: I share only the one screen in a part of installation, because when you install the GIT you are just little bit confused; the installation is simple but in the midst of installation you can uncheck the Windows Explorer Integration and then install it. You can download the GIT from this URL.

GIT from this URL

Step 2: Now open the Android studio and go the configure button and press it.

configure

Step 3: Then after clicking the configure button now click on setting button.

Setting

Step 4: Now when you click the setting button this page appears, now you paste the correct GIT installation Path where you install it, then press Test button for connection. My connection is OK.

connection

Step 5: Now in the left side you see the GitHub tag appears, click on this tag and give the username and password and then click on test button. Now you see that the connection between GitHub account and your Android studio is configured.

GitHub

Step 6: Now open the CMD and type the commands:

  • Cd “\Program Files\Git\bin Press Enter
  • git config –global user.email “Your Email” Press Enter
  • git config –global user.name “Your Username”

    commands

Step 7: Now open the Android studio and at the top toolbar you can see that VCS button appears; click on it and then click Enable Version Control Integration then you select the version control software which is Git and you see in the image also.

Enable Version Control Integration
Enable Version Control

Step 8: Now after pressing the Enable OK button inthe previous step then again click on VCS and click on Import into version control and then click on Share Project On GitHub.

version control

Step 9: Now give the repository name which  appears in GitHub account. You can also the change the name of your repository here and then press share button.

 your repository

Now the code is shared and it takes 2 minutes and then this option appears.

GitHub account

Step 10: Now after that open the Android studio and delete the project which is in your computer and also delete from Android studio by clicking on the backspace button; you can see that my window is clear.

android studio

Step 11: Now click on Check Out Version from Version Control and then select the GitHub.

Check Out Version

Step 12:
Now go the GitHub account and you see that your repository appears and now copy the URL and paste it.

repository

Step 13: Now paste the URL address into Git Repository URL and select the parent directory and Directory Name and then click on Test button you see that the connection is successfully created.

paste the URL address

Step 14: Now click on clone button in previous step and you select the all checkboxes and click on Ok button; now your project is loaded into your directory and as well as in your Android studio.

Add file

Read more articles on Android: