feat(repo clone): add --no-upstream flag#12527
Open
LouisLau-art wants to merge 2 commits intocli:trunkfrom
Open
feat(repo clone): add --no-upstream flag#12527LouisLau-art wants to merge 2 commits intocli:trunkfrom
LouisLau-art wants to merge 2 commits intocli:trunkfrom
Conversation
Allow users to skip adding an upstream remote when cloning a fork. This is useful for users who want to clone their fork without automatically tracking the parent repository.
Member
|
Hey @LouisLau-art, thanks for working on this. I noticed some indentation issues and it looks like it failed our linter as well. You'll probably need to run |
Author
|
Thanks for the heads-up! I ran gofmt on the updated files and pushed the fix. Please take another look when you have a moment. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #8274.
This PR adds a
--no-upstreamflag to therepo clonecommand.When cloning a fork, GitHub CLI currently adds the parent repository as an
upstreamremote by default. This flag allows users to skip this behavior and only clone the repository with the defaultoriginremote.Changes:
NoUpstreamtoCloneOptions.--no-upstreamflag to the command.cloneRunto skip upstream logic if the flag is provided.