From 7131e2f4a88b761b093d154705825a4ecb8ce8c0 Mon Sep 17 00:00:00 2001 From: bl-ue <54780737+bl-ue@users.noreply.github.com> Date: Thu, 7 Jan 2021 16:48:05 -0500 Subject: [PATCH] git-annotate: add page (#5096) --- pages/common/git-annotate.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 pages/common/git-annotate.md diff --git a/pages/common/git-annotate.md b/pages/common/git-annotate.md new file mode 100644 index 0000000000..9ad786ea60 --- /dev/null +++ b/pages/common/git-annotate.md @@ -0,0 +1,14 @@ +# git annotate + +> Show commit hash and last author on each line of a file. +> See `git blame`, which is preferred over `git annotate`. +> `git annotate` is provided for those familiar with other version control systems. +> More information: . + +- Print a file with the author name and commit hash prepended to each line: + +`git annotate {{path/to/file}}` + +- Print a file with the author email and commit hash prepended to each line: + +`git annotate -e {{path/to/file}}`