From a83619d692deeb2565335144078465acb2dd1457 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Mon, 28 Apr 2008 11:32:12 -0400 Subject: add special "matching refs" refspec This patch provides a way to specify "push matching heads" using a special refspec ":". This is useful because it allows "push = +:" as a way to specify that matching refs will be pushed but, in addition, forced updates will be allowed, which was not possible before. Signed-off-by: Paolo Bonzini Signed-off-by: Junio C Hamano --- Documentation/git-push.txt | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'Documentation') diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt index 0585949137..7d31263aa2 100644 --- a/Documentation/git-push.txt +++ b/Documentation/git-push.txt @@ -46,12 +46,6 @@ specified, the same ref that referred to locally). If the optional leading plus `+` is used, the remote ref is updated even if it does not result in a fast forward update. + -Note: If no explicit refspec is found, (that is neither -on the command line nor in any Push line of the -corresponding remotes file---see below), then "matching" heads are -pushed: for every head that exists on the local side, the remote side is -updated if a head of the same name already exists on the remote side. -+ `tag ` means the same as `refs/tags/:refs/tags/`. + A parameter without a colon pushes the from the source @@ -59,6 +53,13 @@ repository to the destination repository under the same name. + Pushing an empty allows you to delete the ref from the remote repository. ++ +The special refspec `:` (or `+:` to allow non-fast forward updates) +directs git to push "matching" heads: for every head that exists on +the local side, the remote side is updated if a head of the same name +already exists on the remote side. This is the default operation mode +if no explicit refspec is found (that is neither on the command line +nor in any Push line of the corresponding remotes file---see below). \--all:: Instead of naming each ref to push, specifies that all -- cgit v1.2.3