From 0266c29e8e276462b2e2e34fc33a937488700e3a Mon Sep 17 00:00:00 2001 From: Max Black Date: Tue, 2 Dec 2025 18:02:35 -0800 Subject: [PATCH] docs(version): add note about git version requirements - Add note that git 2.0.0 or later is recommended for npm version - Helps users troubleshoot issues with older git versions - Addresses feedback from issue about cryptic errors with git 1.9 Fixes #2871 --- docs/lib/content/commands/npm-version.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/lib/content/commands/npm-version.md b/docs/lib/content/commands/npm-version.md index f9b5ed051567e..d65c5441cf56e 100644 --- a/docs/lib/content/commands/npm-version.md +++ b/docs/lib/content/commands/npm-version.md @@ -25,6 +25,8 @@ If run in a git repo, it will also create a version commit and tag. This behavior is controlled by `git-tag-version` (see below), and can be disabled on the command line by running `npm --no-git-tag-version version`. It will fail if the working directory is not clean, unless the `-f` or `--force` flag is set. +**Note:** Git integration requires a reasonably recent version of git (2.0.0 or later is recommended). If you encounter issues with git commands, ensure your git installation is up to date. + If supplied with `-m` or [`--message` config](/using-npm/config#message) option, npm will use it as a commit message when creating a version commit. If the `message` config contains `%s` then that will be replaced with the resulting version number. For example: