Skip to content

Commit

Permalink
Merge branch 'yd/doc-merge-annotated-tag'
Browse files Browse the repository at this point in the history
Document the 1.7.9 feature to merge a signed tag and keep that in
the mergetag header in the resulting commit better.

* yd/doc-merge-annotated-tag:
  Documentation: merging a tag is a special case
  • Loading branch information
Junio C Hamano committed Mar 28, 2013
2 parents 436b60c + 77c7278 commit f1c8d83
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
24 changes: 24 additions & 0 deletions Documentation/git-merge.txt
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,30 @@ happens:
If you tried a merge which resulted in complex conflicts and
want to start over, you can recover with `git merge --abort`.

MERGING TAG
-----------

When merging an annotated (and possibly signed) tag, Git always
creates a merge commit even if a fast-forward merge is possible, and
the commit message template is prepared with the tag message.
Additionally, if the tag is signed, the signature check is reported
as a comment in the message template. See also linkgit:git-tag[1].

When you want to just integrate with the work leading to the commit
that happens to be tagged, e.g. synchronizing with an upstream
release point, you may not want to make an unnecessary merge commit.

In such a case, you can "unwrap" the tag yourself before feeding it
to `git merge`, or pass `--ff-only` when you do not have any work on
your own. e.g.

---
git fetch origin
git merge v1.2.3^0
git merge --ff-only v1.2.3
---


HOW CONFLICTS ARE PRESENTED
---------------------------

Expand Down
3 changes: 2 additions & 1 deletion Documentation/merge-options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ set to `no` at the beginning of them.

--no-ff::
Create a merge commit even when the merge resolves as a
fast-forward.
fast-forward. This is the default behaviour when merging an
annotated (and possibly signed) tag.

--ff-only::
Refuse to merge and exit with a non-zero status unless the
Expand Down

0 comments on commit f1c8d83

Please sign in to comment.