From: Omri Sarig via GitGitGadget Date: Tue, 03 Mar 2026 17:12:05 GMT Subject: [PATCH v2] doc: add information regarding external commands Message-ID: In-Reply-To: From: Omri Sarig Git supports running external commands in the user's PATH as if they were built-in commands (see execv_dashed_external in git.c). This feature was not fully documented in Git's user-facing documentation. This commit adds a short documentation of this feature, making it easier for users to discover and use. Signed-off-by: Omri Sarig --- doc: Add information regarding external commands Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-2220%2Fomrisarig13%2Fexternal-commands-documentation-v2 Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-2220/omrisarig13/external-commands-documentation-v2 Pull-Request: https://github.com/git/git/pull/2220 Range-diff vs v1: 1: b7e2b586c1 < -: ---------- doc: add information regarding external commands -: ---------- > 1: 02841b66ea doc: add information regarding external commands Documentation/git.adoc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Documentation/git.adoc b/Documentation/git.adoc index ce099e78b8..8bb3cb53f5 100644 --- a/Documentation/git.adoc +++ b/Documentation/git.adoc @@ -487,6 +487,13 @@ System `$HOMEDRIVE$HOMEPATH` if both `$HOMEDRIVE` and `$HOMEPATH` exist; otherwise `$USERPROFILE` if `$USERPROFILE` exists. +`PATH`:: + When a user runs 'git ' that is not part of the core Git programs + (installed in GIT_EXEC_PATH), 'git-' that is runnable by the user + in a directory on `$PATH` is invoked. Argument passed after the command + name are passed as-is to the runnable program. These commands precedes + alias expansion. + The Git Repository ~~~~~~~~~~~~~~~~~~ These environment variables apply to 'all' core Git commands. Nb: it base-commit: 2cc71917514657b93014134350864f4849edfc83 -- gitgitgadget