Github Bash

 第一步生成密钥:ssh-keygen -C 'your@email.address'
第二步验证结果:ssh -T git@github.com
第三步克隆:git clone https://github.com/chzeze/Fzusj.git
第四步初始化:git init
第五步添加文件:git add .
第六步加标签:git commit -m 'first_commit'
第七步添加远程:git remote add origin https://github.com/findingsea/myRepoForBlog.git
第八步push:git push origin master

【注】

如果执行git remote add origin https://github.com/findingsea/myRepoForBlog.git,出现错误:

  fatal: remote origin already exists

  则执行以下语句:

  git remote rm origin

  再往后执行git remote add origin https://github.com/findingsea/myRepoForBlog.git 即可。

  在执行git push origin master时,报错:

  error:failed to push som refs to.......

  则执行以下语句:

  git pull origin master

  先把远程服务器github上面的文件拉下来,再push 上去。

原文地址:https://www.cnblogs.com/zeze/p/5287141.html