Forrest logo
back to the git tool

git-show:tldr:3b424

git-show: Show a commit's message in a single line, suppressing the diff output.
$ git show --oneline -s ${commit}
try on your machine

The command git show --oneline -s ${commit} is used to display summarized information about a specific commit in a Git repository.

Let's break down the components of the command:

  • git show: This is a Git command used to display information about a specific commit or set of commits. It shows the changes made in the commit, along with other details like the author, date, and commit message.

  • --oneline: This is an option used with the git show command to display a brief summary of each commit. With this option, only the first line of the commit message is shown instead of the full message.

  • -s: This option, when used with git show, causes only the summary information to be displayed, excluding the actual changes made in the commit. It stands for "summary" or "short".

  • ${commit}: This is a placeholder for the specific commit you want to display information about. Replace ${commit} with the actual commit identifier, such as a commit hash or a branch name, to show information about that commit.

By using git show --oneline -s ${commit}, you will get a summarized view of the specified commit, showing only the first line of the commit message and excluding the actual changes.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the git tool