list mirror (unofficial, one of many)
 help / color / Atom feed
From: Avery Pennarun <>
To: Git Mailing List <>
Subject: Announcement: git-subtrac (a sequel to git-subtree)
Date: Sun, 10 Nov 2019 01:44:30 -0500
Message-ID: <> (raw)

Hi all,

Ten years ago (yikes!), I wrote git-subtree to work around some of
the usability problems with git submodules. I don't have much more
luck with submodules now than I did back then, but I've also never
been very happy with git-subtree's limitations. Luckily I've learned
a lot since then, so I've made another try at it.

Here's my new attempt, git-subtrac:

Unlike git-subtree, it encourages you to use an almost-pure git
submodule workflow. But like git-subtree, it makes it easy to include
the entire history (actually the "history of histories" since
submodules can go backwards, forwards, and sideways over time) of
the submodules in your superproject's repo.

As a result, it's easy to push, pull, fork, merge, and rebase your
entire project no matter how many submodules you like to use. When
someone does a 'fetch' of your superproject repo, they get all the
submodule repos as well.

The trick is pretty straightforward. Like git-subtree, we generate a
shadow history of commits, converting subtree links from inside trees into
additional parent commits. This causes them to be pushed/pulled as
part of a single ref. The shadow history is stable (anyone generating a
shadow tree from commit X will always get the same shadow tree X+)
and can be forked or merged just like the original tree. The idea is
that you'd have a branch called 'master.trac' that is the companion
to the 'master' branch, holding the submodule history needed to
checkout any commit in that branch.

Then you simply set "url = ." for every entry in .gitmodules, and off
it goes.

You could also use this as a tool for managing patch queues: create a
superproject with just one submodule that you want to patch. Every
time you rebase your patch queue, make a new commit in the
superproject, then tie it into a nice package with subtrac.

Anyway, comments welcome. This one is written in go using the go-git
library, which is very nice indeed, although it would presumably
prevent this from ever being merged into git itself.

Have fun,


                 reply index

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link list mirror (unofficial, one of many)

Archives are clonable:
	git clone --mirror
	git clone --mirror http://ou63pmih66umazou.onion/git
	git clone --mirror http://czquwvybam4bgbro.onion/git
	git clone --mirror http://hjrcffqmbrq6wope.onion/git

Example config snippet for mirrors

Newsgroups are available over NNTP:

 note: .onion URLs require Tor:

AGPL code for this site: git clone