Git don't collect a subcommand in transit

I am trying to add a git subcommand. I believe that all that is required is to have an executable file called git-whateversomewhere in mine PATH, and this will allow me to run it as git whatever. However, this does not work for me.

[tamlyn ~/.bin] $ ls
total 8
drwxr-xr-x   4 tamlyn  staff       136 20 Oct 09:40 ./
drwxr-xr-x+ 44 tamlyn  staff      1496 19 Oct 17:56 ../
-rwxr-xr-x   1 tamlyn  staff        19 20 Oct 09:40 git-test*
[tamlyn ~/.bin] $ cat git-test 
#!/bin/sh
echo OK!
[tamlyn ~/.bin] $ cd ..
[tamlyn ~] $ git-test
OK!
[tamlyn ~] $ git test
git: 'test' is not a git command. See 'git --help'.

Did you mean this?
    reset

I am running git 2.5.3 installed via Homebrew on OS X 10.10.5.

+4
source share

Source: https://habr.com/ru/post/1612385/


All Articles