Skip to content

Instantly share code, notes, and snippets.

@sohang3112
Created April 8, 2025 21:10
Show Gist options
  • Save sohang3112/a93b9ad66fbee34213d447b0913587f0 to your computer and use it in GitHub Desktop.
Save sohang3112/a93b9ad66fbee34213d447b0913587f0 to your computer and use it in GitHub Desktop.
Fork repo to a different Git platform.
# Example of forking ziglings repo from CodeBerg to Github
UPSTREAM=https://codeberg.org/ziglings/exercises.git
[email protected]:sohang3112/ziglings.git # mk empty Github repo & copy SSH url (as Github doesn't support push with HTTPS)
git clone $UPSTREAM ziglings/ # (optional argument) used custom cloned folder name ziglings/
cd ziglings/ # go to cloned repo
git remote set-url origin $FORK
git remote add upstream $UPSTREAM
git push
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment