Commit 48adf2f
committed
push: suggest <remote> <branch> when a slash slips into the repository
"git push origin/main" treats "origin/main" as a repository, builds an
anonymous remote from it, and fails later with "'origin/main' does not
appear to be a git repository", giving no hint that a space was meant
instead of a slash.
When the repository argument is not a configured remote and its part
before the first slash names one, suggest the intended
"git push <remote> <branch>" form.
Signed-off-by: Harald Nordgren <haraldnordgren@gmail.com>1 parent e45aa87 commit 48adf2f
2 files changed
Lines changed: 29 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
744 | 744 | | |
745 | 745 | | |
746 | 746 | | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
747 | 765 | | |
748 | 766 | | |
749 | 767 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
57 | 68 | | |
58 | 69 | | |
59 | 70 | | |
| |||
0 commit comments