Skip to content

Instantly share code, notes, and snippets.

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