fix issue #6932

add `git remote set-url` before fetch to set the remote repo to the new url, if provided