Skip to content

个人计算机学习笔记 Personal Computer Science Learning Notes

License

Notifications You must be signed in to change notification settings

waterfall-xi/MyCSNotes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

MyCSNotes

个人计算机学习笔记 Personal Computer Science Learning Notes

Git guide for commit & push

On Unix-like

Take Ubuntu, for example:

cd localRespositoryDirectory/
git init  #Create .git folder in current directory
#Recommendatory, add ssh github address as remote. Make sure that SSH is configured before push (see following)
git remote add origin [email protected]:githubAccountName/repositoryName.git
#Unrecommendatory, add https github address as remote
git remote add origin https://github.com/githubAccountName/repositoryName.git

git add filename.md
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
#Or local config
git config user.email "[email protected]"
git config user.name "Your Name"
git commit -m "message of commit"
git branch -M master
git push -u origin master  #Set upstream at first time
git branch --set-upstream-to=origin/master master  #Above do this incidentally
git push  #Use this after above

Local SSH key genarating & GitHub config

ssh-keygen -t rsa -b 4096 -C "[email protected]"
cat ~/.ssh/id_rsa.pub  #SSH key her
#copy this output

GitHub home -> account (right top) -> settings -> SSH and GPG kys -> New SSH key

一定要复制全部的id_rsa.pub内容,即从ssh-rsa到最后。 Must copy the all content in id_rsa.pub, i. e. from ssh-rsa to the end.

About

个人计算机学习笔记 Personal Computer Science Learning Notes

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published