github上传代码步骤
git clone https://github.com/findingsea/myRepoForBlog.git打开代码所在位置右击选择git bash
git init git add . git commit -m 'first_commit' git remote add origin https://github.com/findingsea/myRepoForBlog.git 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
页:
[1]