在本地项目所在目录按以下步骤操作
echo # test >> README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/qhorse/test.git
git push -u origin master
$ git remote add origin https://github.com/qhorse/test.git
fatal: remote origin already exists.
解决办法如下:
1、先输入$ git remote rm origin
2、再输入$ git remote add origin https://github.com/qhorse/test.git
就不会报错了!
最后一步上传
时间: 2024-10-08 23:14:54