Is there any difference between doing git remote set-url foo bar
and:
git remote remove foo
git remote add foo bar
Assume foo
is a single-URL remote.
git remote remove
also removes remote-tracking branches and git remote add
doesn't restore them. You need to git fetch
to fetch remote branches.
git remote set-url
changes the URL without affecting remote-tracking branches.