git clone
Add the link obtained from the corresponding project to copy the project locally.
If the command provided in the documentation does not explicitly specify a directory, it means that the command is executed in the directory of the downloaded folder.
The download of code in Github does not require authentication, but the upload of code requires authentication, which requires some local configuration. You can configure your username and email address with the following command.
git config --global user.name YourUserName
git config --global user.email YourEmail
Generate your own key
ssh-keygen -t rsa -C YourEmail
Keep pressing enter and the key will be saved in the default directory.
View Key
cd ~/.ssh/
vim id_rsa.pub
Copy the key to the corresponding project on Github to complete the authentication.
Generally the cloned code will go to the master branch by default, we need to create a separate branch and make changes to the code on our own branch.
git branch your-Alias/filename
git checkout your-Alias/filename
After making changes on the cloned document, you can start the code commit process.
Add the changes to the staging area
git add yourfilename
Adding cache contents to the local repository.
git commit -m ‘Your File Note’
Submitting code to the cloud repository.
git push --set-upstream origin your-Alias/filename