From a33f630def569a66d7163ff0d4a1ed6d310a2245 Mon Sep 17 00:00:00 2001 From: jitakirin Date: Tue, 31 Oct 2017 22:32:16 +0000 Subject: [PATCH 1/3] git-diff: add example using relative time range Close #1368 --- pages/common/git-diff.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pages/common/git-diff.md b/pages/common/git-diff.md index e042dbf60..0c895d397 100644 --- a/pages/common/git-diff.md +++ b/pages/common/git-diff.md @@ -14,6 +14,10 @@ `git diff --staged` +- Show changes from all commits since a given date/time: + +`git diff 'HEAD@{3 days ago}'` + - Show only names of changed files since a given commit: `git diff --name-only {{commit}}` From 29bae17f8cc318debd9fc91e715d978fbce64c9b Mon Sep 17 00:00:00 2001 From: jitakirin Date: Wed, 1 Nov 2017 07:07:23 +0000 Subject: [PATCH 2/3] git-diff: update examples to show other possibilities Show that date expression/spec can contain other items and combinations of items, or an actual timestamp. --- pages/common/git-diff.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/common/git-diff.md b/pages/common/git-diff.md index 0c895d397..f0e6d92ec 100644 --- a/pages/common/git-diff.md +++ b/pages/common/git-diff.md @@ -14,9 +14,9 @@ `git diff --staged` -- Show changes from all commits since a given date/time: +- Show changes from all commits since a given date/time (a date expression, e.g. `1 week 2 days` or an ISO date): -`git diff 'HEAD@{3 days ago}'` +`git diff 'HEAD@{3 months|weeks|days|hours|seconds ago}'` - Show only names of changed files since a given commit: From dbff7a26f7f9db8fbe7e3b9abc2bc6bfd047c4c4 Mon Sep 17 00:00:00 2001 From: Agniva De Sarker Date: Thu, 2 Nov 2017 09:47:47 +0530 Subject: [PATCH 3/3] git-diff: update description Replace backticks with quotes --- pages/common/git-diff.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/common/git-diff.md b/pages/common/git-diff.md index f0e6d92ec..19a7ee3c4 100644 --- a/pages/common/git-diff.md +++ b/pages/common/git-diff.md @@ -14,7 +14,7 @@ `git diff --staged` -- Show changes from all commits since a given date/time (a date expression, e.g. `1 week 2 days` or an ISO date): +- Show changes from all commits since a given date/time (a date expression, e.g. "1 week 2 days" or an ISO date): `git diff 'HEAD@{3 months|weeks|days|hours|seconds ago}'`