Git URL Change
From time to time I download something via HTTPS and then need to push it back via SSH. This note reminds me that I’ve done this task before even though I need to look it up again. The full instrctions for setting the remote relationship is in the git documentation.
- Open Terminal .
- Change the current working directory to your local project.
- Change your remote’s URL from HTTPS to SSH with the git remote set-url command.
$ git remote set-url origin git@github.com:USERNAME/REPOSITORY.git.
- Verify that the remote URL has changed.
$ git remote -v
Categories: