This article focuses only on the success of the code upload, does not explain what is git what github,git have any advantage.
1, first create an Android app,
Step two: Create a GitHub account and install Git. There are a plethora of articles online. The only thing to say is to remember the installation directory.
Step three: Configure Git and GitHub accounts in Android Studio.
With the above two figures, it is not far from success.
Fourth step: Click Vcs--import into Version Control--share project on GitHub in Android studio and the next occurrence
Fill in the content, click Share appears
Then the dialog box appears click OK. It came up. is not very simple. and see it on my github.
The code was uploaded successfully. , when you modify a file or add a file, upload it to local git, select the app, right click Git--commit Directory. Then fill in the upload instructions
Here is a description of the Commit is to upload the local git,commit and Push. is uploaded to the local git clumsy pull to the server code. It is generally recommended to commit in the push, always point to determine, and then appear to upload the success of the look.
Of course, this whole process will have a few questions: it is also my development process problems:
1,share appears when you get the sure you have the correct access rights and the repository exists. Baidu found that SSH key has a problem. This article is also recommended by this article to solve my problem http://blog.csdn.net/niubitianping/article/details/54864448. The explanation is. The command in the fifth step of configuring SSH in this article eval ' ssh-agent ' on my computer does not work on my computer is eval $ (ssh-agent). Finally open
Id_rsa.pub file (Note that the content inside of me is the beginning of Ssh-rsa, GitHub key fills in the request) copy all the text inside. Go to GitHub and add it.
And then
Add in upload will not appear above the problem.
2. When the code is submitted, if it conflicts with other people's code, it cannot be submitted or pulled down. And then you need to talk to someone else about the code to change.
Step-by-step implementation of Android studio code uploaded to GitHub.