Creating a New Repository with Android Studio
Following are the simple steps to create a new repository with android studio on GitHub. You can share android studio project on github from any computer like Windows, Mac and Linux.
1. Download and Install Git
First, you have to install Git on your computer to create a repository with android studio on GitHub. If you have not installed Git yet in your computer following are the links to download Git for Windows, Mac and Linux.
Download Git for Windows: http://git-scm.com/download/win
Download Git for Mac: http://git-scm.com/download/mac
Download Git for Linux: http://git-scm.com/download/linux
2. Configuring the VCS
To configure the VCS, open a sample project in Android Studio.
Go to File >> Settings >> Version Control >> GitHub
If you already have GitHub account, enter your username and password then click Test button. If you see successful message, click Ok button. If don’t have GitHub account then first click in Signup.
Again, Go to File >> Settings >> Version Control >> Git and browse git.exe and click Test button. If you see successful message, click Ok button and again click Ok button at the bottom of windows. This looks like screenshot below.
C:\Program Files\Git\cmd\git.exe
3. Enable Android Studio Version Control System in the Current Android Project
To activate the current android project with VCS, Go to VCS >> Enable Project for Version Control Integration from android studio menu bar.
New window appears there when you click Enable Project for Version Control Integrationand select Git in the Select a version control system to associate with the project root and click Ok button.
4. Share Project on GitHub from Android Studio
From Android Studio menu bar, go to VCS >> Import into Version Control >> Share Project on GitHub.
A new window appears (Share Project on GitHub), give the name of your reposition name without white space. Here I’m using Menu Item Clickable project so my reputation name is MenuItemClickable and add description of your project in the Description box and click Share button.
Again, when you click Share button another Add Files Initial Commit window appears. In this window, all the files are selected by default. If you have any secret file please unselect and click Ok button.
After doing this, you will get a message of successfully shared project on GitHub. Now open GitHub in any of your browser, your project is already uploaded on GitHub.
