git merge: invalid strategy specified
Quick summary
You passed an invalid merge strategy to git merge -s — only recursive, ort, resolve, ours, theirs, subtree are built-in strategies.
Why this happens
The strategy name is misspelled or uses a custom strategy that is not installed or configured
You used a strategy meant for a different git version — ort replaced recursive as default in git 2.34+
The -s flag was confused with -X which passes options to the strategy rather than selecting the strategy
Minimal example
git merge -s thiers feature # error: unknown strategy: 'thiers'git merge -s theirs feature # correct strategy nameThe strategy name must be spelled exactly as git expects — 'theirs' not 'thiers'. Git validates the name before attempting the merge.
How to diagnose
Run git merge -s help or git help merge to list available built-in merge strategies
Check the git version with git --version to confirm which default strategy is available
Review the command to ensure -s is followed by a strategy name and -X is used for strategy options
How to fix
Use a valid built-in strategy name: git merge -s recursive, -s ort, -s ours, -s theirs, or -s subtree
Install the custom strategy as a git-merge-<name> executable in PATH if using a non-standard strategy
Use -X to pass options to the strategy instead of -s, e.g., git merge -s recursive -X theirs branch
How to prevent
Refer to git merge --help for the list of valid strategies before specifying -s on the command line
Use the default strategy by omitting -s entirely for most merges — git selects the best strategy automatically
Related Resources
Related Glossary
Related Lessons
- git merge
Learn about merging branches.