how to reset origin url in git code example
Example 1: git overwrite urlk
git remote set-url origin <git_url>
Example 2: git change origin
$ git remote -v
> origin https://github.com/USERNAME/REPOSITORY.git (fetch)
> origin https://github.com/USERNAME/REPOSITORY.git (push)
Change your remote\'s URL from HTTPS to SSH with the git remote set-url command.
$ git remote set-url origin [email protected]:USERNAME/REPOSITORY.git
Verify that the remote URL has changed.
$ git remote -v
> origin [email protected]:USERNAME/REPOSITORY.git (fetch)
> origin [email protected]:USERNAME/REPOSITORY.git (push)
Example 3: git reset origin
git fetch origin
git reset --hard origin/master
Remember this forever
Example 4: git reset remote origin
$ git remote set-url origin https://github.com/USERNAME/REPOSITORY.git