1 Generate ssh-key locally: ssh-keygen -t rsa -C "$userEmail" 2 Paste the public key in the github account 3 Add remote library locally: git remote add origin git@xxxxx.git 4 Test whether it is successful - ->Commit a file, then push it to see if it is available on github
5 When connecting to other github libraries on this computer in the future, steps 1 and 2 will be omitted
1 Generate the secret locally: $ ssh-keygen -t rsa -C "youremail@example.com" 2 Then cd .ssh into the folder vim id_rsa.pub and paste the secret into github (located in "Account settings", "SSH Keys" page) 3 Associate local and remote trousers (note to modify the address): $ git remote add origin git@github.com:michaelliao/learngit.git 4 $ git push -u origin master 5 Push directly in the future Use command: $ git push origin master
Please see the help https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
Click on your project link on github. If it is empty, there will be detailedsteps
1 Generate ssh-key locally: ssh-keygen -t rsa -C "$userEmail"
2 Paste the public key in the github account
3 Add remote library locally: git remote add origin git@xxxxx.git
4 Test whether it is successful - ->Commit a file, then push it to see if it is available on github
5 When connecting to other github libraries on this computer in the future, steps 1 and 2 will be omitted
1 Generate the secret locally: $ ssh-keygen -t rsa -C "youremail@example.com"
2 Then cd .ssh into the folder vim id_rsa.pub and paste the secret into github (located in "Account settings", "SSH Keys" page)
3 Associate local and remote trousers (note to modify the address): $ git remote add origin git@github.com:michaelliao/learngit.git
4 $ git push -u origin master
5 Push directly in the future Use command: $ git push origin master