Skip to main content

git-nested

logo

An alternative to git-submodule and git-subtree for managing nested repositories.

Test Docs codecov Quality Gate Status PyPI License: MIT Python 3.10+

📖 Documentation: https://thorsten-klein.github.io/git-nested/

What is git-nested?

git-nested puts another git repository into a folder of your repository. The files are ordinary files in ordinary commits. You can still pull new changes from the other repository, and push your changes back to it.

git nested clone https://github.com/user/lib ext/lib   # copy it in
git nested pull ext/lib                                # get new upstream changes
git nested push ext/lib                                # send your changes back
git nested status                                      # see where everything stands

A small .gitnested file in the folder remembers the URL, the branch and the upstream commit. So the commands stay short.

Why git-nested?

  • Self-contained. Your repository has all files. A plain git clone gets everything. No access to the other repositories is needed.
  • Simple. The commands feel like git.
  • Clean history. By default one pull is one commit.
  • Flexible. Each branch can have its nested repositories in another state.
  • Safe to try. Everything is a normal commit. git reset undoes it.

Only people who pull or push nested repositories need git-nested. See Compared to submodule and subtree.

Install

pip install git-nested

git 2.23 and Python 3.10 or newer are needed. There is also a standalone executable that needs no Python. See Install git-nested for all ways, shell completion and the manual page.

Documentation

The full documentation is in doc/, and online at https://thorsten-klein.github.io/git-nested/.

Help on the command line:

git nested --help          # the manual page
git nested pull --help     # one command: what it does, its options, examples

Contributing

Pull requests are welcome. See Development for the setup and the checks. The short version:

uv sync          # install everything
uv run poe all   # every check CI runs

Report security problems as described in SECURITY.md.

Authors

git-nested:

  • Thorsten Klein - Python rewrite and enhancements

Original git-subrepo authors:

  • Ingy döt Net - Original concept and implementation
  • Magnus Carlsson - Contributor
  • Austin Morgan - Contributor

License

MIT. See LICENSE.

Acknowledgments

This project is based on git-subrepo by Ingy döt Net. git-nested is a Python rewrite with some modified features and improvements.

Metadata

Release files for git-nested 1.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for git-nested 1.2.1
File Size Uploaded Provenance Actions
git_nested-1.2.1.tar.gz 312.1 kB With provenance Details for git_nested-1.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for git-nested 1.2.1
File Interpreter ABI Platform Actions
git_nested-1.2.1-py3-none-any.whl Python 3 none any Details for git_nested-1.2.1-py3-none-any.whl

Total release size: 395.4 kB

Release files / git_nested-1.2.1.tar.gz

Download URL git_nested-1.2.1.tar.gz
Size 312.1 kB
Tags Source
SHA-256 checksum
How to use checksums
a77c91b3d2a0eaf18c23f383eded685dd1399a8a4922e701f376792ff4e436c9
BLAKE2b-256 checksum
How to use checksums
b73314452de0a0b31aa5fd4c7b72375b0c28b54843dbf6a9cfdf638fd435ce7a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 18, 2026.

Transparency log

Release files / git_nested-1.2.1-py3-none-any.whl

Download URL git_nested-1.2.1-py3-none-any.whl
Size 83.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7facf353ffde12d892104c09b4352d6d787ed049159d34bef2cc7e8d4e843bda
BLAKE2b-256 checksum
How to use checksums
45b016c219481ecfbc50735621150a6729cae5d326fc96318af3e2204c1ca84c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 18, 2026.

Transparency log

Security for git-nested 1.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for git_nested-1.2.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 18, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page