git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git subtree: an alternative to git submodule

From
Avery Pennarun <apenwarr@gmail.com>
Date
May 15, 2009, 16:09 UTC
Message-ID
<32541b130905150909h7e596f26w7db6887e7f4267ff@mail.gmail.com>
In-Reply-To
<1241822349-27470-1-git-send-email-apenwarr@gmail.com>
On Fri, May 8, 2009 at 6:39 PM, Avery Pennarun <apenwarr@gmail.com> wrote:
Show 20 quoted lines
> I first sent out this patch set a couple of weeks ago
> (http://article.gmane.org/gmane.comp.version-control.git/117612) and got a
> couple of positive comments, but no negative ones, so I'm guessing people
> haven't reviewed it as closely as I would have hoped :)
>
> git subtree has these subcommands:
>
>  - add: connect a given commit to a given subtree, basically using the
>   occasionally-documented 'git read-tree --prefix; git commit' trick.
>
>  - merge: a user-friendlier form of 'git merge -s subtree'
>
>  - pull: likewise, but for git pull
>
>  - split: (the magical part!) generate a new commit series from the given
>   prefix, so you can submit subtree changes *back* to the upstream project
>   you merged in the first place.
>
> Does anyone have any comments on what it would take to get the git subtree
> stuff accepted into git?
Hi all,

Just checking in again. Since I originally announced git-subtree, it (or rather the concept) has received a bit of positive feedback out in the wild. My original blog post about it: http://alumnit.ca/~apenwarr/log/?m=200904#30

The heroku mailing list: http://groups.google.com/group/heroku/browse_thread/thread/5e6807fcd2572f64

Ycombinator news: http://news.ycombinator.com/item?id=604405 And again: http://news.ycombinator.com/item?id=604889

Meanwhile, I've been keeping it in a separate git repo here: http://github.com/apenwarr/git-subtree/commits/master (that's a web link, not a git link).

The common thread in all these discussions is along the lines of, "This sounds cool! I didn't try it though. Maybe I should!" Commenters then seem to disappear into a black hole. The black hole of my code! Bwahahaha! Sigh.

I would love to hear some feedback about this, particularly for the question of what needs to be done to get it adopted into git's mainline, or if it's in fact so evil that this is unlikely to ever happen. Obviously I would need to write a man page, but I've been hesitant to do that in case people have suggestions that need the whole UI to change. Perhaps that's a chicken-and-egg problem, though, and I should just get on with writing it.

Flame away!
Thanks,
Avery

P.S. Dscho is usually really good at flaming me for being stupid, but he has been strangely silent on this topic so far. Don't miss this exciting opportunity!

Previous: Avery PennarunNext: Junio C Hamano
Message 4 of 11 in “git subtree: an alternative to git submodule”
  1. 0/2 git subtree: an alternative to git submoduleAvery Pennarun, May 8, 2009
  2. 1/2 Add 'git subtree' command for tracking history of subtrees separately.Avery Pennarun, May 8, 2009
  3. 2/2 Automated test script for 'git subtree'.Avery Pennarun, May 8, 2009
  4. Avery PennarunMay 15, 2009
  5. Junio C HamanoMay 15, 2009
  6. Avery PennarunMay 15, 2009
  7. Ping YinMay 18, 2009
  8. Ping YinMay 18, 2009
  9. Avery PennarunMay 18, 2009
  10. Ping YinMay 19, 2009
  11. Jakub NarebskiMay 19, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.