Please sign in to comment.
Add git-git script to autocorrect `git git <cmd>`
I type `git git <command>` with an alarming frequency, especially by accident when running inside of [gitsh], where the `git` prefix is implied. Git does not have a `git` subcommand, so this erorrs with: ``` git: 'git' is not a git command. See 'git --help'. Did you mean this? init ``` When you pass an unknown subcommand to git, it checks if it is a core command defined by git, like `status` and `checkout`. If not, it looks on your `$PATH` for custom subcommands before reporting an error. For example, `git foo-bar` would run `git-foo-bar` if it exists. This change adds a `git-git` command, which executes `git` with whatever arguments are passed in. That means `git git status` will run `git status`. In fact, `git git git git status` will eventually return: ``` $ git git git git git status On branch master Your branch is up-to-date with 'origin/master'. ``` [gitsh]: https://github.com/thoughtbot/gitsh
- Loading branch information...