Skip to content

Instantly share code, notes, and snippets.

@lmmx
Created May 8, 2025 16:51
Show Gist options
  • Save lmmx/cc9f6a1f46309379b9019f4c1823fdb6 to your computer and use it in GitHub Desktop.
Save lmmx/cc9f6a1f46309379b9019f4c1823fdb6 to your computer and use it in GitHub Desktop.
Set upstream on a repo you forked with gh after cloning
gh repo set-default $(git remote get-url upstream | sed 's/.*github.com[:/]\(.*\).git/\1/')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment