summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorChris Rorvick <chris@rorvick.com>2012-11-30 01:41:37 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-12-02 09:44:34 (GMT)
commitdbfeddb12e5bb540ed3c852eebda3df9117bd150 (patch)
tree7c5c6582390c7dabd839b72fafd074b4323b23d9 /Documentation
parent8c5f6f717d136c5a0e9d6d3879bf2a7bdeb42154 (diff)
downloadgit-dbfeddb12e5bb540ed3c852eebda3df9117bd150.zip
git-dbfeddb12e5bb540ed3c852eebda3df9117bd150.tar.gz
git-dbfeddb12e5bb540ed3c852eebda3df9117bd150.tar.bz2
push: require force for refs under refs/tags/
References are allowed to update from one commit-ish to another if the former is an ancestor of the latter. This behavior is oriented to branches which are expected to move with commits. Tag references are expected to be static in a repository, though, thus an update to something under refs/tags/ should be rejected unless the update is forced. Signed-off-by: Chris Rorvick <chris@rorvick.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/git-push.txt11
1 files changed, 6 insertions, 5 deletions
diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt
index fe46c42..09bdec7 100644
--- a/Documentation/git-push.txt
+++ b/Documentation/git-push.txt
@@ -51,11 +51,12 @@ be named. If `:`<dst> is omitted, the same ref as <src> will be
updated.
+
The object referenced by <src> is used to update the <dst> reference
-on the remote side, but by default this is only allowed if the
-update can fast-forward <dst>. By having the optional leading `+`,
-you can tell git to update the <dst> ref even when the update is not a
-fast-forward. This does *not* attempt to merge <src> into <dst>. See
-EXAMPLES below for details.
+on the remote side. By default this is only allowed if <dst> is not
+under refs/tags/, and then only if it can fast-forward <dst>. By having
+the optional leading `+`, you can tell git to update the <dst> ref even
+if it is not allowed by default (e.g., it is not a fast-forward.) This
+does *not* attempt to merge <src> into <dst>. See EXAMPLES below for
+details.
+
`tag <tag>` means the same as `refs/tags/<tag>:refs/tags/<tag>`.
+