Skip to content

Instantly share code, notes, and snippets.

@jacobobryant
Created February 4, 2022 01:26
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
git dad: improve git's error message

Add this to your .bashrc to improve git's error message for a common typo:

git() {
  if [ "$1" = dad ]; then
    curl -H "Accept: text/plain" https://icanhazdadjoke.com/
    echo
  else
    $(which git) "$@"
  fi
}

Example:

$ git dad .
I wouldn't buy anything with velcro. It's a total rip-off.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment