Skip to content

git subtree: an alternative to git submodule

Avery Pennarun git 2 versions In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v1 Latest posting 2/22 patches 8 repliesIn review
  2. v1 posting 1/22 patches 11 repliesSuperseded

Patches in v1 posting 2/2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2Add 'git subtree' command for tracking history of subtrees separately..gitignore Makefile command-list.txt +1 more+380 -00 replies
2/2Automated test script for 'git subtree'.subtree-test.sh+206 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH/RFC RESEND 0/2] git subtree: an alternative to git submodule

Hi all,

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?

Thanks,

Avery

Avery Pennarun (2):
Add 'git subtree' command for tracking history of subtrees
separately.
Automated test script for 'git subtree'.

 .gitignore       |    1 +
 Makefile         |    1 +
 command-list.txt |    1 +
 git-subtree.sh   |  435 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 subtree-test.sh  |  206 ++++++++++++++++++++++++++
 5 files changed, 644 insertions(+), 0 deletions(-)
 create mode 100755 git-subtree.sh
 create mode 100755 subtree-test.sh