Show

Other topics

Remarks:

Shows various Git objects.

  • For commits, shows the commit message and diff
  • For tags, shows the tag message and referenced object

Overview

git show shows various Git objects.


For commits:

Shows the commit message and a diff of the changes introduced.

CommandDescription
git showshows the previous commit
git show @~3shows the 3rd-from-last commit

For trees and blobs:

Shows the tree or blob.

CommandDescription
git show @~3:shows the project root directory as it was 3 commits ago (a tree)
git show @~3:src/program.jsshows src/program.js as it was 3 commits ago (a blob)
git show @:a.txt @:b.txtshows a.txt concatenated with b.txt from current commit

For tags:

Shows the tag message and the referenced object.

Syntax:

  • git show [options] <object>...

Contributors

Topic Id: 3030

Example Ids: 10290

This site is not affiliated with any of the contributors.