You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
seems #1882 has broken the previous behavior...
you used to be able to write gh repo fork and the origin would become upstream and your fork would become origin
Reason for the behavior
I use to run gh repo clone some/repo to start messing with the code to solve a problem than once ready to run gh repo fork
So this is changing the previous behavior, right? If you cloned a repo from origin, then added a fork, you would have the old origin be added to the upstream remote, and the new >origin would be your fork. As I understand, this isn't possible anymore:
Apologies for changing the behavior of this command abruptly. We've received feedback that renaming the remote was undesirable and we wanted to switch to a less "magic" behavior where the user keeps more control over how they organize their remotes.
Because the original behavior is still kept in non-interactive mode for scripts, you can opt into it by doing gh repo fork --remote | cat (or otherwise redirecting stdout).
Because the original behavior is still kept in non-interactive mode for scripts, you can opt into it by doing gh repo fork | cat (or otherwise redirecting stdout).
Not really. I didn't have any remote created when using this in a non-interactive way.
@kubukoz Well, thank you for trying again, and sorry again for sending you on a wild goose chase. It turns out that the backwards-compatible fix for scripting landed after a tagged release 1fa3047, so it will only be available after the next release.
Different behavior for non-interactive variant sounds like a really big problem, worse than no fix at all tbh. Scripting is not where you want to get surprises.
Activity
mislav commentedon Feb 10, 2021
Apologies for changing the behavior of this command abruptly. We've received feedback that renaming the remote was undesirable and we wanted to switch to a less "magic" behavior where the user keeps more control over how they organize their remotes.
Because the original behavior is still kept in non-interactive mode for scripts, you can opt into it by doing
gh repo fork --remote | cat(or otherwise redirecting stdout).kubukoz commentedon Feb 10, 2021
Not really. I didn't have any remote created when using this in a non-interactive way.
mislav commentedon Feb 10, 2021
@kubukoz Thank you for trying, and sorry for the misleading instructions. I forgot the flag:
gh repo fork --remote | catkubukoz commentedon Feb 10, 2021
😅
mislav commentedon Feb 10, 2021
@kubukoz Well, thank you for trying again, and sorry again for sending you on a wild goose chase. It turns out that the backwards-compatible fix for scripting landed after a tagged release 1fa3047, so it will only be available after the next release.
Xerkus commentedon Feb 11, 2021
Different behavior for non-interactive variant sounds like a really big problem, worse than no fix at all tbh. Scripting is not where you want to get surprises.
jetersen commentedon Feb 17, 2021
@vilmibm and @mislav thanks for restoring behavior. That's awesome 😎 🚀