# apenwarr/git-subtree

An experimental alternative to the git-submodule command.  Merges and splits subtrees from your project into subprojects and back.

Repository: https://github.com/apenwarr/git-subtree
Canonical: https://ross.abutalabs.com/products/git-subtree
Language: Shell
License: GPL-2.0
License Family: copyleft
Last push: 2017-07-20T09:27:11+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 6339, "days_push": 3331, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1384, forks 125 (observed 2026-08-28T04:04:34.690520+00:00)

## What it is
git-subtree is a Shell-based Git extension that lets you merge subprojects into a repository's subtree and split them back out, serving as an alternative to git-submodule. It keeps subproject history in the main repository rather than using separate checkouts.

## Use cases
- manage a vendored dependency inside my git repo without submodules
- split a subdirectory of my repo into its own project while preserving history
- merge an external repository into a subfolder of my project
- push changes made in a subtree back to the upstream subproject
- avoid the pain of git submodules for shared libraries
- keep a monorepo with components that can still be published separately

## When to choose
- you want dependencies stored directly in your repository history instead of as submodule pointers
- you need to extract a subdirectory into a standalone repo with full commit history
- your team finds git-submodule workflows confusing or error-prone
- you vendor third-party code but occasionally need to sync changes upstream

## When to avoid
- you need lightweight submodule pointers without duplicating history in your repo
- you want a tool with active development and recent releases (this project's last release was 2017 and its functionality was merged into core Git)
- you only need modern Git's built-in subtree support, which ships with Git itself

## Facets
- artifact type: cli-tool
- maturity: maintenance
- function: version-control, cli, developer-tools
- domain: version-control, developer-tools
- platform: cli, cross-platform
- tags: git, subtree, submodules-alternative, shell, monorepo, command-line

## Member repositories
- apenwarr/git-subtree (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:34.690520+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:39:58.757811+00:00, confidence not recorded.
  - readme: https://github.com/apenwarr/git-subtree (fetched 2026-08-28T04:04:34.690520+00:00, sha 0114c850a872)
- Data as of 2026-08-30T08:39:29.467469+00:00.
