1. Add a new sshkey to the GitHub account to establish an SSH connection with GitHub locally.
(1) execute the ssh-keygen command locally to generate a new SSH key pair
# Ssh-keygen
(2) modify. in the id_rsa.pub file under the ssh/directory, change "=" to the email address of your GitHub account (the current login user is root)
# Vi/root/. Ssh/id_rsa.pub
(3) log on to GitHub, set --> SSH keys, click "add SSH key", "title", and set step (2) copy and paste all the content of the modified id_rsa.pub file to "key" and click "add key ".
Ii. Submit code
(1) clone the GitHub project to a local device.
# Git clone-V [email protected]: xxx/xxx. Git
(2) copy the file to be submitted to step (1) and clone it to the local directory.
(3) Add the content to be submitted
# Git add *
(4) set submission description
# Git commit-as-M "Description"
(5) Push code to GitHub
# Git push
This article is from the "blackart" blog, please be sure to keep this source http://blackart.blog.51cto.com/1142352/1544610
GitHub code submission