1 min read

How to change the uri url for a remote git repository

A local repository connection switching between remote endpoints.

How to change the uri url for a remote git repository

  1. check your remote url
git remote -v
  1. change you url
  git remote set-url origin <new.git.url/here>

see git help remote or you can edit .git/config and change the URLs there. You're not in any danger of losing history unless you do something very silly (and if you're worried, just make a copy of your repo, since your repo is your history.)

  1. you can check it if it change again:
git remote -v

for more information about change remote repository

https://docs.github.com/en/get-started/getting-started-with-git/managing-remote-repositories

  • Growth5 min read ↗
  • Engineering

    Git Stash

    Git stash is a built-in command with the distributed Version control tool in Git that locally stores all the most recent changes in a workspace and resets the state of the workspace to the prior commit state.

    2 min read ↗
  • Engineering

    Git Branching

    Branching is a feature available in most modern version control systems.

    3 min read ↗