个人计算机学习笔记 Personal Computer Science Learning Notes
-
Bash Command Complete: 个人GNU Bash 命令大全和用户手册。 Personal GNU Bash command complete and user guide.
-
Learn C++ Tutorial - Learning Note: 在线教程Learn C++ – Skill up with our free tutorials的学习笔记——我最喜欢的C++教程。 Learning Note on on-line tutorial Learn C++ – Skill up with our free tutorials, which is my favorite C++ tutorial.
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
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.