Skip to content
__THIS REPO IS OBSOLETE__ - future development is in - An experimental alternative to the git-submodule command. Merges and splits subtrees from your project into subprojects and back.
Find file
Pull request Compare This branch is 4 commits behind sun:master.
Failed to load latest commit information.
.gitignore Merge commit '594606d7f804d34ecb9fb8fb3fd1543ae190be95' into config
Makefile Weird, I forgot to have 'make test' call [DOC] Mention `git --exec-path` in README.
asciidoc.conf Add basic git-subtree manpage in asciidoc format.
git-subtree basic options parsing and whatnot.
git-subtree.deb add deb package [FIX] Reformat to original style to pass original tests.
git-subtree.txt Added --force option to push Add info about `make doc` and make executable.
manpage-base.xsl Add basic git-subtree manpage in asciidoc format.
manpage-normal.xsl Add basic git-subtree manpage in asciidoc format. basic options parsing and whatnot. [TEST] Add subtree and immediately push.
todo If someone provides a --prefix that ends with slash, strip the slash.


git-subtree allows subprojects to be included within a sub-directory of a main project, optionally including the sub-project's entire history.


Choose one of the following ways to install git-subtree:

  1. Copy the file to where all other git scripts are stored (git --exec-path will tell you this).
  2. Run in a Git-enabled shell (that's "Git Bash" on Windows).
  3. Run make install in a Cygwin-enabled shell.

Any one of these actions makes the git subtree command available (note: space instead of dash).

To additionally install the man page:

make doc
cp git-subtree.1 /usr/share/man/man1/


See git-subtree.txt for details.

Known issues

See todo.


You may use this software under the terms of the GNU General Public License (GPL), Version 2.



Originally authored by Avery Pennarun,

Please do not contact the author using github mail. Instead,

Something went wrong with that request. Please try again.