We already have created and run our first app. Before adding new features to that, it’s a good practice to integrate the project to a version control system such as Subversion (SVN), Mercurial or Git. So here we will see how to integrate Android Studio to your GitHub account. After that you will be able to perform commits, updates, adds, merges, checkouts etc. Do you know what I’m talking about, right? So let’s go!

1 Enable version control integration in Android Studio

VCS → Enable Version Control Integration→ Git

2 Download and install GitHub Desktop

3 Inform Android Studio about Git executable location

File→ Settings→ Version Control→ Git→ Path to Git executable If you use Windows, your path should be something like that: C:UsersXXXXXAppDataLocalGitHubPortableGit_XXXXXcmdgit.exe

4 Connect Android Studio to your GitHub account

File→ Settings→ Version Control→ GitHub Host: github.com Login: … Password: …

5 Share your project

VCS→ Import into Version Control→ Share Project on GitHub→ Share A new repository was created.

6 Add your code to the repository

Right click on your project directory (app)→ Git→ Add

7 Commit the changes

Right click on your project directory (app)→ Git→ Commit Directory→ Commit Message→ Commit and Push→ Commit→ Name and Email→ Set and Commit→ Push

All right! Now our project is in a web repository we are ready to improve the app. We can write some code finally! On the next post...