$ git config --global user.name "Your Name"
$ git config --global user.email "email@example.com"
$ ssh-keygen -t rsa -C "youremail@example.com"
Create repository
git clone https://github.com/***/Linear.git
git init
$ git init
$ touch README.md
$ git add README.md
$ git commit -m ‘first_commit‘
$ git remote add origin https://github.com/***/Linear.git
$ git push origin master
$ git add .
$ git commit -m ‘this_commit‘
$ git remote add origin https://github.com/***/Linear.git
origin为远程仓库名,是Git的默认叫法,也可以为别的。
$ git remote rm origin
$ git push -u origin master
$ git pull origin master
将远程库中的内容拉下来再重新推送上去
原文:https://www.cnblogs.com/rookieveteran/p/12639374.html