git-nested
An alternative to git-submodule and git-subtree for managing nested repositories.
📖 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 clonegets 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 resetundoes 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/.
- About git-nested
- git-nested in 5 minutes
- Everyday tasks
- How it works
- Command reference
- The
.gitnestedfile - Guides: conflicts, partial upstreams, pins, submodules and more
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.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| git_nested-1.2.0.tar.gz | 307.8 kB | With provenance | Details for git_nested-1.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| git_nested-1.2.0-py3-none-any.whl | Python 3 | none | any | Details for git_nested-1.2.0-py3-none-any.whl |
Total release size: 389.9 kB
Release files / git_nested-1.2.0.tar.gz
| Download URL | git_nested-1.2.0.tar.gz |
|---|---|
| Size | 307.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5a9b30c59592749fa169fd8c200861340ca992b93d68fce7c60d9f7e0995d02a
|
|
BLAKE2b-256 checksum How to use checksums |
86446a152513e3169487c79ed6833b0f2cbb145e2c5d1fb6b2338ab56348b932
|
| 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 17, 2026.
Transparency logRelease files / git_nested-1.2.0-py3-none-any.whl
| Download URL | git_nested-1.2.0-py3-none-any.whl |
|---|---|
| Size | 82.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
00b713baf966f8eb948d8bc59735992c961169a94b2726da105b119a4b1ed1c0
|
|
BLAKE2b-256 checksum How to use checksums |
631e4eb3ccb30f186ae01cb38c23ad60988f16542aa6a7495f7e7fd92e95428e
|
| 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 17, 2026.
Transparency logSecurity for git-nested 1.2.0
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.
Attestation for git_nested-1.2.0.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 17, 2026.
Transparency logA 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.