gitgit-subtree

Why was `git-subtree` removed from the git-scm book?


When looking for documentation on git-subtree my search engine will show links to https://git-scm.com/docs/git-subtree, however when I visit that link I'm redirected to https://git-scm.com/docs.

What happened to subtree? Is is deprecated or is this just a mistake? If it's deprecated, is there an announcement with rationale and a suggestion for what might replace it (e.g. are there plans to bring in git-subrepo)?


Solution

  • git-subtree is a contrib command: https://github.com/git/git/tree/master/contrib/subtree. Therefore it is not part of git's core. The documentation on https://git-scm.com is built from core git and does not include contrib software. This can be slightly confusing since package maintainers often distribute contrib software with the system git package.

    This must be my search engine trying to be smart and show https://git-scm.com/docs/{search-term} when users search for something that looks like a git command, like git-*.