提示出錯信息:fatal: remote origin already exists.
解決辦法如下:
1、先輸入$ git remote rm origin
2、再輸入$ git remote add origin git@github.com:djqiang/gitdemo.git 就不會報錯了!
3、如果輸入$ git remote rm origin 還是報錯的話,error: Could not remove config section 'remote.origin'. 我們需要修改gitconfig文件的內容
4、找到你的github的安裝路徑,我的是C:\Users\ASUS\AppData\Local\GitHub\PortableGit_ca477551eeb4aea0e4ae9fcd3358bd96720bb5c8\etc
5、找到一個名為gitconfig的文件,打開它把里面的[remote "origin"]那一行
刪掉就好了!