From 46fec9c1ce3c61389b7128fa86a571481b8a73f4 Mon Sep 17 00:00:00 2001 From: "https://www.google.com/accounts/o8/id?id=AItOawmp_51DcIT2sqrOhtg7LgCj2Pyaa5ujxTI" Date: Wed, 23 Jul 2014 23:38:55 +0000 Subject: [PATCH] --- .../local_subtree_and_broken_symlinks.mdwn | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 doc/forum/local_subtree_and_broken_symlinks.mdwn diff --git a/doc/forum/local_subtree_and_broken_symlinks.mdwn b/doc/forum/local_subtree_and_broken_symlinks.mdwn new file mode 100644 index 0000000000..de6dd6e491 --- /dev/null +++ b/doc/forum/local_subtree_and_broken_symlinks.mdwn @@ -0,0 +1,21 @@ +Here's a simple example on a repository with three branches, where we'll be adding images-annex as a subtree into master. + + $ git branch + git-annex + images-annex + * master + $ git subtree add --squash --prefix=images/ images-annex + Added dir 'images' + $ ls + FILE_A FILE_B images/ + +...checkout images-annex, make changes, commit... + + $ git checkout master + $ git subtree pull --squash --prefix=images/ . images-annex + From . + * branch images-annex -> FETCH_HEAD + Merge made by the 'recursive' strategy. + ...(files created/modified/etc) + +I have tried a few different methods for merging the subtree in and so far have not been able to keep git-annex links up to date. Running `git-annex fix .` does what it's supposed to but then git sees everything as modified. Is this entirely the expected behavior because of the --prefix? I have not used subtrees much before but the model appears to be very helpful for what I'm trying to do.