From c5a8569ecedef725ff61a23766f062a541b545e8 Mon Sep 17 00:00:00 2001 From: Waldir Pimenta Date: Tue, 26 Nov 2019 18:56:44 +0000 Subject: [PATCH] git-show: add example for showing file contents (#3600) --- pages/common/git-show.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pages/common/git-show.md b/pages/common/git-show.md index 7cd09a2b1..9f5cd34ef 100644 --- a/pages/common/git-show.md +++ b/pages/common/git-show.md @@ -22,3 +22,7 @@ - Show a commit's hash and message in a single line, suppressing the diff output: `git show --oneline -s {{commit}}` + +- Show the contents of a file as it was at a given revision (e.g. branch, tag or commit): + +`git show {{revision}}:{{path/to/file}}`