Skip to content

Instantly share code, notes, and snippets.

View GregKWhite's full-sized avatar

Greg White GregKWhite

  • Discord
View GitHub Profile

Fancy Git Logs

This is a quick tutorial that shows you how to set up logs for Git that will only display commits from your current branch!

Instructions

First, you'll need to set up a helper file that contains some Bash functions that Git will use. I placed mine in .githelpers.

Here are the scripts you'll need. If you use a different format, remove the --pretty=colored argument, or change colored to the name of the format you use.

@GregKWhite
GregKWhite / diff-so-fancy-setup.markdown
Last active July 15, 2021 00:53
Describes how to set up diff-so-fancy
  • Install diff-so-fancy via their website (or just run npm install -g diff-so-fancy)
  • Add the following to your .gitconfig file:
[core]
  pager = diff-so-fancy | less --tabs=1,5 -R
  • I find that these colors work best with it, but it's up to you if you want to add them to your .gitconfig or not.
[color "diff"]
 meta = "yellow bold"