[TOC] > [github](https://github.com/nvbn/thefuck) ## 安装 mac `brew install thefuck` ## 使用 在出现命令错误的时候 直接使用 fuck 即可 ``` ➜ git push fatal: The current branch master has no upstream branch. To push the current branch and set the remote as upstream, use git push --set-upstream origin master ➜ fuck git push --set-upstream origin master [enter/↑/↓/ctrl+c] Counting objects: 9, done. ... ```