diff options
author | Junio C Hamano <gitster@pobox.com> | 2020-10-27 15:09:49 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-10-27 15:09:50 -0700 |
commit | 40696c67274305d6258539de5a36649cf833f712 (patch) | |
tree | c7f286e661d93790c42b5443cd4b0ab9dd9c6e4e /Documentation | |
parent | Merge branch 'sk/force-if-includes' (diff) | |
parent | clone: allow configurable default for `-o`/`--origin` (diff) | |
download | tgif-40696c67274305d6258539de5a36649cf833f712.tar.xz |
Merge branch 'sb/clone-origin'
"git clone" learned clone.defaultremotename configuration variable
to customize what nickname to use to call the remote the repository
was cloned from.
* sb/clone-origin:
clone: allow configurable default for `-o`/`--origin`
clone: read new remote name from remote_name instead of option_origin
clone: validate --origin option before use
refs: consolidate remote name validation
remote: add tests for add and rename with invalid names
clone: use more conventional config/option layering
clone: add tests for --template and some disallowed option pairs
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/config.txt | 2 | ||||
-rw-r--r-- | Documentation/config/clone.txt | 4 | ||||
-rw-r--r-- | Documentation/git-clone.txt | 5 |
3 files changed, 9 insertions, 2 deletions
diff --git a/Documentation/config.txt b/Documentation/config.txt index bf706b950e..025ca4df11 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -334,6 +334,8 @@ include::config/checkout.txt[] include::config/clean.txt[] +include::config/clone.txt[] + include::config/color.txt[] include::config/column.txt[] diff --git a/Documentation/config/clone.txt b/Documentation/config/clone.txt new file mode 100644 index 0000000000..47de36a5fe --- /dev/null +++ b/Documentation/config/clone.txt @@ -0,0 +1,4 @@ +clone.defaultRemoteName:: + The name of the remote to create when cloning a repository. Defaults to + `origin`, and can be overridden by passing the `--origin` command-line + option to linkgit:git-clone[1]. diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt index 097e6a86c5..876aedcd47 100644 --- a/Documentation/git-clone.txt +++ b/Documentation/git-clone.txt @@ -183,8 +183,9 @@ objects from the source repository into a pack in the cloned repository. -o <name>:: --origin <name>:: - Instead of using the remote name `origin` to keep track - of the upstream repository, use `<name>`. + Instead of using the remote name `origin` to keep track of the upstream + repository, use `<name>`. Overrides `clone.defaultRemoteName` from the + config. -b <name>:: --branch <name>:: |