Suggest the intended form when a remote/branch slip is given#2147
Closed
HaraldNordgren wants to merge 2 commits into
Closed
Suggest the intended form when a remote/branch slip is given#2147HaraldNordgren wants to merge 2 commits into
HaraldNordgren wants to merge 2 commits into
Conversation
a5619a7 to
1ca9ca4
Compare
"git branch --set-upstream-to origin main" reads the trailing word as the local branch to operate on and dies with "branch 'main' does not exist", pointing at the wrong problem. When that branch is missing and "<remote>/<branch>" names a real remote-tracking ref, suggest the intended "git branch --set-upstream-to=<remote>/<branch>" form. Signed-off-by: Harald Nordgren <haraldnordgren@gmail.com>
"git push origin/main" is treated as a repository and dies with "'origin/main' does not appear to be a git repository", with no hint that a space was meant instead of a slash. When the argument is not an existing path or configured remote but its part before the first slash names one, suggest the intended "git push <remote> <branch>" form. The suggestion is shown as advice so it can be silenced with advice.pushRepoLooksLikeRef. Signed-off-by: Harald Nordgren <haraldnordgren@gmail.com>
1ca9ca4 to
59eaa50
Compare
Author
|
Closing; reopening against git/git. |
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.
No description provided.