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.
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.
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 Integration and 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.
You have successfully shared android studio project on GitHub. Click Here to see our Menu Item Clickable project example on GitHub. If you get any problem during sharing android studio project on GitHub, mention details in the comment box below.