-
Notifications
You must be signed in to change notification settings - Fork 8k
Closed
Labels
bugSomething isn't workingSomething isn't workingpriority-2Affects more than a few users but doesn't prevent core functionsAffects more than a few users but doesn't prevent core functions
Description
Describe the bug
gh version 0.7.0 (2020-04-22)
gh repo fork renames origin to upstream and sets my fork as origin. I want to retain origin untouched and add an origin named fork.
Steps to reproduce the behavior
I had a clone of an organization repo
$ git remote -v
origin ssh://git@github.com/org/repo.git (fetch)
origin ssh://git@github.com/org/repo.git (push)I forked it
$ gh repo fork
- Forking org/repo...
✓ Created fork jglick/repo
? Would you like to add a remote for the fork? Yes
✓ Renamed origin remote to upstream
✓ Added remote origin
$ git remote -v
origin git@github.com:jglick/repo.git (fetch)
origin git@github.com:jglick/repo.git (push)
upstream ssh://git@github.com/org/repo.git (fetch)
upstream ssh://git@github.com/org/repo.git (push)Expected vs actual behavior
I wanted to see
$ gh repo fork
- Forking org/repo...
✓ Created fork jglick/repo
? Would you like to add a remote for the fork? Yes
✓ Added remote fork
$ git remote -v
fork git@github.com:jglick/repo.git (fetch)
fork git@github.com:jglick/repo.git (push)
origin ssh://git@github.com/org/repo.git (fetch)
origin ssh://git@github.com/org/repo.git (push)or be prompted.
Workaround
git remote rename origin fork
git remote rename upstream originReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingpriority-2Affects more than a few users but doesn't prevent core functionsAffects more than a few users but doesn't prevent core functions