The documentation for `git log` is sadly misleading when it comes to tracking renames. By far the most common option that users new to git want is the ability to view the history of a file across renames. Unfortunately, `git log --help` shows:
NAME
git-log - Show commit logs
[...]
OPTIONS
[...]
-M
Detect renames....and most users stop reading there. Unfortunately, what they're generally looking for comes significantly later:
[...]
--follow
Continue listing the history of a file beyond renames.Signed-off-by: Alex Vandiver <alex@chmrr.net> --- Documentation/diff-options.txt | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)
Show changes to Documentation/diff-options.txt +6 −0
diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt index 8707d0e..bcbad88 100644 --- a/Documentation/diff-options.txt +++ b/Documentation/diff-options.txt @@ -175,7 +175,13 @@ endif::git-format-patch[] Break complete rewrite changes into pairs of delete and create. -M:: +ifdef::git-log[] + Show renames in diff output. See `--follow` to track history + across renames. +endif::git-log[] +ifndef::git-log[] Detect renames. +endif::git-log[] -C:: Detect copies as well as renames. See also `--find-copies-harder`.
-- 1.6.6.rc0.363.g69d13.dirty