Home|Blog List

Fun facts on git pull

Thursday, March 31, 2016 • Estimated Reading Time: 1 minute

This is probably my favorite little script that I have configured to execute with a Git alias:

#!/bin/bash
elinks -dump randomfunfacts.com | sed -n '/^│ /p' | tr -d \│

I have this saved as ~/bin/fact and linked to a Git alias with the following config in my ~/.gitconfig file:

[alias]
    p = !~/bin/fact && git pull

Each time I pull updates in any repository, it takes just enough time to complete for me to read a random fun fact:

$ git p
 Every time you lick a stamp, you're consuming 1/10 of a calorie.
Current branch master is up to date.