git remote set-url命令修改remote URL
git remote set-url传递两个参数
例如:从SSH切换到HTTPS的远程URL
1 2 3 |
xxxxxx@xxxxxx:~/workspace/goal$ git remote -v origin git@github.com:xxxxxx/SpringBoot.git (fetch) origin git@github.com:xxxxxx/SpringBoot.git (push) |
1 |
xxxxxx@xxxxxx:~/workspace/goal$ git remote set-url origin https://github.com/xxxxxx/SpringBoot.git |
1 2 3 |
xxxxxx@xxxxxx:~/workspace/goal$ git remote -v origin https://github.com:xxxxxx/SpringBoot.git (fetch) origin https://github.com:xxxxxx/SpringBoot.git (push) |