Objective
Before writing this article I assume that you have installed Android studio and already have a project built with Android Studio.
So since this blog post is being submitted to GitHub, naturally we need to understand two concepts: git and GitHub.
Git is a version control system, with the SVN, CVS peer concept
GitHub is a Web site that provides users with a git service. This way you don't have to deploy a git system to register your account directly, so you can use the GIT service they provide.
Get ready
- A git version control system needs to be installed on your PC. such as the Git GUI;
- Register an account on the GitHub website.
Steps
- Associating Android Studio with Git
In setting--> Version control--> git-->path to git executable, select the Git.exe path in the bin directory of your installed Git GUI.
- Associating Android Studio with GitHub
Enter your account name and password on the GitHub website in setting--> Version control--> GitHub
- OK after the two environment configuration OK then let's start uploading the project. Start by building a project in Android studio. Steps to upload the project to GitHub
Wait patiently for your project to appear on the GitHub website.
- Update the project.
OK now our new project code has changed, add a test class, want to commit the changed code on GitHub
First, we'll add the code to the local library:
Right-click the project (or right-click on the file you want to add, if you right-click the file, such as out of the menu is not a commit Directory, but the commit file, but the operation is the same) operation:
Click Commit, click Commit in the Popup box
The test class is then added to the local library;
And then we're uploading the test class to GitHub.
OK, Upload success!
Add
After I configured GitHub I found that the original SVN was useless. After testing, it turns out that the Setting-->version control right drop-down menu selects the repository you want to submit:
How to submit (update) an Android studio project to GitHub