Skip to main content

Command Palette

Search for a command to run...

Using Git Better - Part 2

Let's learn how to view git commit history better

Published
1 min read
Using Git Better - Part 2

Let's learn how to view commit history better

A better way to view commit history

git log --pretty=format:"%h - %an, %ar : %s" -6

Time limiting the logs you see

git log --pretty=format:"%h - %an, %p %ar : %s" --since=2.weeks
git log --pretty="%h - %s" --since="2022-01-01" --before="2022-06-01"

git restore is an alternative to git reset

Unstaging a Staged File with git restore from Git v2.23 onwards**

git restore --staged README.md

Using Git Better

Part 3 of 5

In this series, I will show how to setup and use Git better. By engaging with my posts, you'll elevate your Git proficiency to a new level.

Up next

Using Git Better - Part 1

Learn how to use Git commands Better - Part 1