From 33118a53ac5c83c8f6b4cc1b9a271da85df1c288 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Richard=20M=C3=B6rbitz?= Date: Sun, 30 Oct 2022 05:54:25 +0100 Subject: [PATCH] git-blame: add commit examples (#9380) --- pages/common/git-blame.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pages/common/git-blame.md b/pages/common/git-blame.md index dede3cf591..5c9e54d251 100644 --- a/pages/common/git-blame.md +++ b/pages/common/git-blame.md @@ -10,3 +10,11 @@ - Print file with author email and commit hash on each line: `git blame -e {{file}}` + +- Print file with author name and commit hash on each line at a specific commit: + +`git blame {{commit}} {{path/to/file}}` + +- Print file with author name and commit hash on each line before a specific commit: + +`git blame {{commit}}~ {{path/to/file}}`