git change to ssh code example
Example 1: git overwrite urlk
# Overwriting an existing git url:
git remote set-url origin <git_url>
Example 2: git set remote origin url
git remote set-url origin new.git.url/here
Example 3: git change ssh key
git config core.sshCommand "ssh -i ~/.ssh/id_rsa_example -F /dev/null"
git pull
git push
# Other way
edit .git/config file like:
[core]
sshCommand = ssh -i ~/.ssh/id_rsa_example -F /dev/null