diff options
author | Teng Long <dyroneteng@gmail.com> | 2023-05-06 14:34:08 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-05-07 00:36:43 +0300 |
commit | 425b4d7f47bd2be561ced14eac36056390862e8c (patch) | |
tree | 21399bd405b812faeabff214cd32d862b82a0b6c /Documentation/git-push.txt | |
parent | 69c786637d7a7fe3b2b8f7d989af095f5f49c3a8 (diff) |
push: introduce '--branches' option
The '--all' option of git-push built-in cmd support to push all branches
(refs under refs/heads) to remote. Under the usage, a user can easlily
work in some scenarios, for example, branches synchronization and batch
upload.
The '--all' was introduced for a long time, meanwhile, git supports to
customize the storage location under "refs/". when a new git user see
the usage like, 'git push origin --all', we might feel like we're
pushing _all_ the refs instead of just branches without looking at the
documents until we found the related description of it or '--mirror'.
To ensure compatibility, we cannot rename '--all' to another name
directly, one way is, we can try to add a new option '--heads' which be
identical with the functionality of '--all' to let the user understand
the meaning of representation more clearly. Actually, We've more or less
named options this way already, for example, in 'git-show-ref' and 'git
ls-remote'.
At the same time, we fix a related issue about the wrong help
information of '--all' option in code and add some test cases in
t5523, t5543 and t5583.
Signed-off-by: Teng Long <dyroneteng@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-push.txt')
-rw-r--r-- | Documentation/git-push.txt | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt index 5bb1d5aae2..297927d866 100644 --- a/Documentation/git-push.txt +++ b/Documentation/git-push.txt @@ -9,7 +9,7 @@ git-push - Update remote refs along with associated objects SYNOPSIS -------- [verse] -'git push' [--all | --mirror | --tags] [--follow-tags] [--atomic] [-n | --dry-run] [--receive-pack=<git-receive-pack>] +'git push' [--all | --branches | --mirror | --tags] [--follow-tags] [--atomic] [-n | --dry-run] [--receive-pack=<git-receive-pack>] [--repo=<repository>] [-f | --force] [-d | --delete] [--prune] [-v | --verbose] [-u | --set-upstream] [-o <string> | --push-option=<string>] [--[no-]signed|--signed=(true|false|if-asked)] @@ -147,6 +147,7 @@ already exists on the remote side. `tag <tag>` means the same as `refs/tags/<tag>:refs/tags/<tag>`. --all:: +--branches:: Push all branches (i.e. refs under `refs/heads/`); cannot be used with other <refspec>. |