git switch remote repository

1. View the remote warehouse address

$    git remote -v

2. Use git remote set-url to reset the remote warehouse address

$ git remote set-url origin Warehouse B address

3. Check the warehouse address again to see if the reset is successful

$    git remote -v

4.git push force update

$    git push -f

Guess you like

Origin www.cnblogs.com/zhaojingj/p/12746557.html