Skip to content

Instantly share code, notes, and snippets.

@tiagovrtr
Created June 20, 2021 11:31
Show Gist options
  • Save tiagovrtr/fb90b61ece542f3f7505b1a3034ac6ba to your computer and use it in GitHub Desktop.
Save tiagovrtr/fb90b61ece542f3f7505b1a3034ac6ba to your computer and use it in GitHub Desktop.
Move git origin remote reference from upstream to personal fork
alias mv2fork="UPSTREAM=`git config --get remote.origin.url` &&
git remote rename origin upstream &&
git remote add origin ${UPSTREAM/:*\//:$GITHUB_USER/} &&
git fetch origin"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment