Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Display information about a git commit 'without diff' but 'with' files

Tags:

git

I have gone through quite a few variations of this question on SO and documentation and the closest command is git show --quiet and git log --name-only -1 -U

git show --quiet does not show the modified/added/removed/renamed files.

git log --name-only -1 -U is very close to what I need, it shows the commit details similar to git show in addition to the files changes. But it just shows the files changed (and without colour coding). It does not show whether the file was added/modified/renamed/removed.

Is there a command that can show the commit details + files added/modified/renamed/removed but without the diff? This is in hopes to remove my dependence on a GUI tool to go through each commit.

like image 437
Samaursa Avatar asked Jul 28 '26 12:07

Samaursa


1 Answers

Use --name-status instead of --name-only, it does exactly that.

Look at the doc here.

(That being said, and as a sidenote, you don't need -U here, since --name-status or --name-only are preventing diff output anyway.)

I'd just do

git show --name-status
like image 152
Romain Valeri Avatar answered Jul 31 '26 06:07

Romain Valeri



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!