GitHub Quick Start and github Quick Start
1. Create a project on GitHub
Follow the steps to create a code library on github
Address of the project on github after creation: https://github.com/linlin1314/QY
2. upload code
You need to clone the github project to your local location, modify the local project, and submit it again.
Create a repository: (generally, go to the directory of the folder to be uploaded)
1 git init
Select the file to be added to the repository:
1 git add.
Generally, if you want to share all the code in this folder, add ". ", the above example is like this. If you specify the parameter, you only need to set". "change to the file name. Now, you only select the file to be added to the repository. The following shows how to add the file to the repository:
1 git commit-m' comment'
-M is followed by a parameter, indicating that after the code is submitted to GitHub, the description, such as the marked place, will be displayed on the code file information.
After so long, I began to upload the local repository to GitHub. The following two commands solve the problem:
1 2 git remote add origin git@github.com: XXX/XXX. git3 git push-u origin master
ThisThe git@github.com: XXX/XXX. git
That is, the address generated when the project is created above. Now, open your project URL and you will find that your code has been displayed. If you want to update the code, repeat the above.