简体   繁体   中英

git log How to hide commit message

I'm using code like this:

git log --name-only --oneline

And it's showing me this log

在此处输入图像描述

How to show everything of this except commit message?

If you only want to show the commit hash and the files changed use this command:

git log --pretty=format:%h --name-only

per the documentation for git log https://www.git-scm.com/docs/git-log

You can adjust the format of the log with the --pretty option and specifying the format. All the options available are listed in the documenation.

This version formats the log message to only show the abbreviated sha. Adding the --name-only adds the files changed.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM