2017-04-18 20:09:07 +03:00
|
|
|
# git show
|
|
|
|
|
2017-04-19 23:25:28 +03:00
|
|
|
> Show various types of git objects (commits, tags, etc.).
|
2019-06-03 03:06:36 +03:00
|
|
|
> More information: <https://git-scm.com/docs/git-show>.
|
2017-04-18 20:09:07 +03:00
|
|
|
|
2017-04-19 23:25:28 +03:00
|
|
|
- Show information about the latest commit (message, changes, and other metadata):
|
2017-04-18 20:09:07 +03:00
|
|
|
|
|
|
|
`git show`
|
|
|
|
|
2017-04-19 23:25:28 +03:00
|
|
|
- Show information about a given commit:
|
2017-04-18 20:09:07 +03:00
|
|
|
|
|
|
|
`git show {{commit}}`
|
|
|
|
|
2017-04-19 23:25:28 +03:00
|
|
|
- Show information about the commit associated with a given tag:
|
2017-04-18 20:09:07 +03:00
|
|
|
|
|
|
|
`git show {{tag}}`
|
|
|
|
|
2017-04-19 23:25:28 +03:00
|
|
|
- Show information about the 3rd commit from the tip of a branch:
|
2017-04-18 20:09:07 +03:00
|
|
|
|
2017-04-19 23:25:28 +03:00
|
|
|
`git show {{branch}}~{{3}}`
|
|
|
|
|
|
|
|
- Show a commit's hash and message in a single line, suppressing the diff output:
|
|
|
|
|
|
|
|
`git show --oneline -s {{commit}}`
|