Upload the android studio code to github step by step ., Androidgithub
This article only focuses on the Code upload to be successful. It does not explain what git is, github, And what advantages does git have.
1. Create an android Application first,
Step 2: Create a github account and install git. There are many articles on the Internet. Remember the installation directory.
Step 3: Configure git and github accounts in android studio.
With the above two figures, it is not far from success.
Step 4: Click VCS -- Import into version control -- share project on github in android studio.
Enter the content as needed and click share.
Click OK in the displayed dialog box. It appears. Is it easy. Go to my github.
The code is uploaded successfully ., When modifying a file or adding a file, upload the file to the local git first, right-click the APP, and click git -- commit Directory.... Then fill in the upload instructions.
Here, we can see that Commit is used to upload local GIT, Commit and Push. It is used to upload to local Git and pull the server code. In general, we recommend that you start with a commit in push, and click "OK" until the upload is successful.
Of course, there will be several problems in the whole process: they are also problems in the development process:
1. During share, Please make sure you have the correct access rights and the repository exists appear .. Baidu found a problem with the ssh key. I recommend this article to solve my problem at http://blog.csdn.net/niubitianping/article/details/54864448. Note that. In this article, the fifth step of ssh configuration command eval 'ssh-agent' is not available on my computer. My computer uses eval $ (ssh-agent ). Last opened
The id_rsa.pub file (Note: I started with ssh-rsa and the github key is required) copies all the text in it. Add it to github.
Then
The above problems will not occur when you add them to the upload.
2. If the code is submitted in conflict with other people's code, the code cannot be submitted or pulled down. Then, you need to discuss with others who modified the code.