Rob Bednark
Rob Bednark

Reputation: 28212

How to tell "git show" not to show any diffs?

How do I do a git show and show the default git show output, but without showing any diffs?

e.g.,

$ git show
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
commit 2668e3608e (HEAD -> master, origin/master, origin/main, origin/HEAD)
Author: Junio C Hamano <[email protected]>
Date:   Tue May 31 19:10:00 2022 -0700

    Fast-tracking GitHub CI Windows build fixes.

(note: I don't want a diff shown here after the commit comment)

Upvotes: 2

Views: 470

Answers (1)

Rob Bednark
Rob Bednark

Reputation: 28212

git show --no-patch
git log --no-patch  
git show -s
git log -s

"patch" is a term for a type of "diff".

Documentation:

   -s, --no-patch
   Suppress diff output. Useful for commands like git show that show the patch by default, 
   or to cancel the effect of --patch.

[git show --help]

Upvotes: 4

Related Questions