Skip to content

Instantly share code, notes, and snippets.

@lukechilds
Created August 23, 2016 16:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lukechilds/0ce082d5765a006f15fe311f6657235e to your computer and use it in GitHub Desktop.
Save lukechilds/0ce082d5765a006f15fe311f6657235e to your computer and use it in GitHub Desktop.
Git Yup
alias yup='eval $(fc -ln -1 | sed "s/git/git -c \"help.autocorrect=-1\"/")'
@lukechilds
Copy link
Author

lukechilds commented Aug 23, 2016

Usage:

$ git puhs
git: 'puhs' is not a git command. See 'git --help'.

Did you mean this?
        push

$ yup
WARNING: You called a Git command named 'puhs', which does not exist.
Continuing under the assumption that you meant 'push'
Everything up-to-date

Thought this was a cool one liner. If you like this, checkout nvbn/thefuck for a more robust solution.

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