Created
June 20, 2021 11:31
-
-
Save tiagovrtr/fb90b61ece542f3f7505b1a3034ac6ba to your computer and use it in GitHub Desktop.
Move git origin remote reference from upstream to personal fork
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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