Skip to content

Instantly share code, notes, and snippets.

@nappa32
Created May 30, 2017 01:39
Show Gist options
  • Save nappa32/9db55cf516f2fc6700fa46fc459b5cec to your computer and use it in GitHub Desktop.
Save nappa32/9db55cf516f2fc6700fa46fc459b5cec to your computer and use it in GitHub Desktop.
change remote for github to ssh from http
function githubssh ()
{
newremote=$(git remote -v|head -1 |sed 's/https:\/\/github.com\//[email protected]:/g'|awk '{print $2}');
git remote set-url origin $newremote
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment