Skip to content

Instantly share code, notes, and snippets.

@vwedesam
Last active May 9, 2023 10:40
Show Gist options
  • Save vwedesam/34602c609285b437d05005e8d5c7ffeb to your computer and use it in GitHub Desktop.
Save vwedesam/34602c609285b437d05005e8d5c7ffeb to your computer and use it in GitHub Desktop.
Update Local git repository remote origin -> reconfiguration

Let say you move a repo to a new organization, or to a new VCS

The solution is to change the address of the remote, to the correct/new remote location.

Solution 1

run this command

  git config remote.origin.url git@server.com:username/repo-name.git

Solution 2 run this command

  git config -e

This command will open for editing the .git/config file of the repository. you can update the url value to the new remote location.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment