From 232e64981887ffe6f8528f2cdbc1fc89a4d330d9 Mon Sep 17 00:00:00 2001 From: alefir Date: Sat, 15 Apr 2017 16:03:56 -0700 Subject: [PATCH 1/5] Add git-show.md --- pages/common/git-show.md | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 pages/common/git-show.md diff --git a/pages/common/git-show.md b/pages/common/git-show.md new file mode 100644 index 00000000000000..b0e5cce55327be --- /dev/null +++ b/pages/common/git-show.md @@ -0,0 +1,11 @@ +# git show + +> Show various types of objects + +- Show changes made in a commit: + +`git show {{commit}}` + +- Show the contents of a file n commits ago on a branch + +`git show {{branch}}~{{n}}:{{path}} From a7eaea3f8366c5cdc58afb0ff72dcda28dcbf3b8 Mon Sep 17 00:00:00 2001 From: alefir Date: Sat, 15 Apr 2017 16:07:41 -0700 Subject: [PATCH 2/5] Add missing backtick and colon --- pages/common/git-show.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/common/git-show.md b/pages/common/git-show.md index b0e5cce55327be..cec771365e3fc6 100644 --- a/pages/common/git-show.md +++ b/pages/common/git-show.md @@ -6,6 +6,6 @@ `git show {{commit}}` -- Show the contents of a file n commits ago on a branch +- Show the contents of a file n commits ago on a branch: -`git show {{branch}}~{{n}}:{{path}} +`git show {{branch}}~{{n}}:{{path}}` From c0f9fb5b21dadf15d30becc6646a9ac8702d24ed Mon Sep 17 00:00:00 2001 From: alefir Date: Sat, 15 Apr 2017 16:09:35 -0700 Subject: [PATCH 3/5] Replace colons at end of command descriptions with periods --- pages/common/git-show.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/common/git-show.md b/pages/common/git-show.md index cec771365e3fc6..69368be4ae1eaa 100644 --- a/pages/common/git-show.md +++ b/pages/common/git-show.md @@ -2,10 +2,10 @@ > Show various types of objects -- Show changes made in a commit: +- Show changes made in a commit. `git show {{commit}}` -- Show the contents of a file n commits ago on a branch: +- Show the contents of a file n commits ago on a branch. `git show {{branch}}~{{n}}:{{path}}` From 22d94891db05b08206643526421683a71d872f33 Mon Sep 17 00:00:00 2001 From: alefir Date: Sat, 15 Apr 2017 16:12:25 -0700 Subject: [PATCH 4/5] Add period to command description and put colons on example descriptions Why do I always misread travis? --- pages/common/git-show.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pages/common/git-show.md b/pages/common/git-show.md index 69368be4ae1eaa..ab198916dc0e2d 100644 --- a/pages/common/git-show.md +++ b/pages/common/git-show.md @@ -1,11 +1,11 @@ # git show -> Show various types of objects +> Show various types of objects. -- Show changes made in a commit. +- Show changes made in a commit: `git show {{commit}}` -- Show the contents of a file n commits ago on a branch. +- Show the contents of a file n commits ago on a branch: `git show {{branch}}~{{n}}:{{path}}` From 6c8a56e9f0cb7dfff1567d8da1a67b27c7f96779 Mon Sep 17 00:00:00 2001 From: Agniva De Sarker Date: Tue, 18 Apr 2017 13:52:20 +0530 Subject: [PATCH 5/5] Improved the page --- pages/common/git-show.md | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/pages/common/git-show.md b/pages/common/git-show.md index ab198916dc0e2d..7e2dc8dc8d01c2 100644 --- a/pages/common/git-show.md +++ b/pages/common/git-show.md @@ -1,11 +1,19 @@ # git show -> Show various types of objects. +> Show various types of git objects(commits, tags etc.). -- Show changes made in a commit: +- Show changes made in the latest commit: + +`git show` + +- Show changes made in a given commit: `git show {{commit}}` -- Show the contents of a file n commits ago on a branch: +- Show changes made in the commit with a given tag: + +`git show {{tag}}` + +- Show the changes made n commits ago on a branch: -`git show {{branch}}~{{n}}:{{path}}` +`git show {{branch}}~{{n}}`