Skip to content

Commit 198eb1b

Browse files
committed
Merge branch 'os/doc-custom-subcommand-on-path'
The way end-users can add their own "git <cmd>" subcommand by storing "git-<cmd>" in a directory on their $PATH has not been documented clearly, which has been corrected. * os/doc-custom-subcommand-on-path: doc: add information regarding external commands
2 parents f3e1832 + 9c6569a commit 198eb1b

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

Documentation/git.adoc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -487,6 +487,14 @@ System
487487
`$HOMEDRIVE$HOMEPATH` if both `$HOMEDRIVE` and `$HOMEPATH` exist;
488488
otherwise `$USERPROFILE` if `$USERPROFILE` exists.
489489

490+
`PATH`::
491+
When a user runs 'git <command>' that is not part of the core Git programs
492+
(installed in GIT_EXEC_PATH), 'git-<command>' that is runnable by the user
493+
in a directory on `$PATH` is invoked. Argument passed after the command
494+
name are passed as-is to the program. To execute `git <foo>`, `git` finds
495+
command `<foo>` (either a core Git program found in 'GIT_EXEC_PATH', or a
496+
custom one in a directory on 'PATH'), before trying `foo` as an alias.
497+
490498
The Git Repository
491499
~~~~~~~~~~~~~~~~~~
492500
These environment variables apply to 'all' core Git commands. Nb: it

0 commit comments

Comments
 (0)