Git Fundamentals

Level up with "Git Fundamentals"

Access all lessons in this tutorial.

No spam, unsubscribe at any time.

This is a free tutorial

In exchange for your email address, you'll get full access to this and other free Epic Web Dev tutorials.

Why? First and foremost, your inbox allows us to directly communicate about the latest Epic Web Dev material. This includes free tutorials, tips, and periodic update about trends, tools, and happenings in Web Development that I'm excited about.

In addition to the piles of free Epic Web Dev content, you'll get the earliest access and best discounts to the paid courses when they launch.

There won't be any spam, and every email you get will have an unsubscribe link.

If this sounds like a fair trade, let's go!

Current section: Commands 17 exercises
lesson

Optimizing Git Log Output for Better Workflow

The git log command shows a list of commits in your repository.

By default, the output is verbose and shows detailed information about each commit:

![Git log default view](https://res.cloudinary.com/epic-web/image/upload/v1709678379/tutorials/git-foundations/Screenshot_2024-03-05_at_4.33.18_PM.p

Subscribe to unlock this lesson.

Transcript

00:00 Git log is used to see a list of commits. This is our commit for adding commit sub-command notes. This is our commit for adding the username and email config note, and we can hit space to continue on through history. Now, this view is a little wordy for me,

00:16 so I prefer git log with the one line flag. Here we see just the most relevant information, eight unique characters from each SHA, the head commit and which branch we're on, and the commit messages. If you like this log format and want to save it to config,

00:33 use the format.pretty one-line option. Now, we can run git log with just SHA, branch, and commit message in one line. Now, you'll notice that this commit is significantly longer. This is the full commit.

00:47 We also need to set the git config log.abbrev commit to true. Let's try that one more time for nice concise log messages with just the git log command. As always, you can inspect your git config with git config list to see which options are being applied.

Full Stack Vol 1
You might also like

Full Stack Vol 1

Kent C. Dodds
Kent C. Dodds

A comprehensive guide to full stack development

166 Interactive Exercises ・ Progress Tracking ・ Completion Certificate
Learn more