Skip to content

Instantly share code, notes, and snippets.

@floer32
Last active May 25, 2022 17:41
Show Gist options
  • Save floer32/2f2213f9908e7524be5f44e32f8ba927 to your computer and use it in GitHub Desktop.
Save floer32/2f2213f9908e7524be5f44e32f8ba927 to your computer and use it in GitHub Desktop.
git ribbon, git catchup

How I keep up with changes on main

[1/2] These two git aliases: git ribbon, git catchup

I've used these for years (found here)

  • git ribbon to mark latest main you've reviewed (like a ribbon in a journal)
  • git catchup to review diff since then. (then do git ribbon again after reviewing, so it's ready for tomorrow.)

In your ~/.gitconfig, [aliases] section:

ribbon = tag --force _ribbon origin/main
catchup = log --patch --reverse --topo-order _ribbon..origin/main

[2/2] Set git diff viewer to delta

This works best with delta, a really good diff viewer with syntax highlighting:

https://github.com/dandavison/delta

(You just do brew install git-delta (or equivalent for another package manager, it's widely available), then a couple changes to ~/.gitconfig as shown in its README, to configure it as the default diff viewer.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment