* git subtree issues
@ 2009-11-03 3:56 morgflast
2009-11-03 15:43 ` Avery Pennarun
0 siblings, 1 reply; 3+ messages in thread
From: morgflast @ 2009-11-03 3:56 UTC (permalink / raw)
To: git
So, I went ahead and did this
$ git remote add -f vw_extensions git@github.com:sibblingz/vw_extensions.git
(1)
$ git merge -s ours --no-commit vw_extensions/master (2)
$ git read-tree --prefix=some/directory/vw_extensions -u
vw_extensions/master (3)
$ git commit -m "Merge B project as our subdirectory"
And that all seems to work ok.
Then, I went to another directory where i had vw_extensions cloned, and made
a change to the README file, and pushed it.
I went back to my first project, and did this, to try to pull those changes:
git pull -s subtree vw_extensions master remote: Counting objects: 5, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 3 (delta 2), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done.
From git@github.com:sibblingz/vw_extensions
* branch master -> FETCH_HEAD
Already uptodate!
Merge made by subtree.
However, when I looked at the README file in the first project, the changes
weren't there. I was wondering if anyone might have any suggestions about
what to do.
Thanks!
Daniel
--
View this message in context: http://old.nabble.com/git-subtree-issues-tp26159961p26159961.html
Sent from the git mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: git subtree issues
2009-11-03 3:56 git subtree issues morgflast
@ 2009-11-03 15:43 ` Avery Pennarun
[not found] ` <bdccb6a00911031019y48f1d1aax9be7b49e3463595@mail.gmail.com>
0 siblings, 1 reply; 3+ messages in thread
From: Avery Pennarun @ 2009-11-03 15:43 UTC (permalink / raw)
To: morgflast; +Cc: git
On Mon, Nov 2, 2009 at 11:56 PM, morgflast <daniel@sibblingz.com> wrote:
> git pull -s subtree vw_extensions master remote: Counting objects: 5, done.
> remote: Compressing objects: 100% (3/3), done.
> remote: Total 3 (delta 2), reused 0 (delta 0)
> Unpacking objects: 100% (3/3), done.
> From git@github.com:sibblingz/vw_extensions
> * branch master -> FETCH_HEAD
> Already uptodate!
> Merge made by subtree.
>
> However, when I looked at the README file in the first project, the changes
> weren't there. I was wondering if anyone might have any suggestions about
> what to do.
Hmm, the output certainly wasn't very helpful :(
Usually what "already uptodate" means is that the commit it merged
didn't actually cause any changes. Is it possible there's another
README file that already contained this change?
The other problem with subtree merge is that it tries to *guess* which
subtree you want to merge, which unfortunately fails almost as often
as it succeeds. If it guessed incorrectly, it might have thrown away
all the directories except one that didn't change at all. If this is
the problem, I don't have an easy fix; my git-subtree command (which
makes it a bit easier to do the things you're trying to do in your
email) suffers from this too. Eventually I was thinking of giving in
and making subtree merge properly configurable, but I haven't had
time.
Or maybe this is a totally different problem. What do you get from:
git diff --stat $(git merge-base HEAD^ FETCH_HEAD) FETCH_HEAD
?
Avery
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-11-04 19:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-03 3:56 git subtree issues morgflast
2009-11-03 15:43 ` Avery Pennarun
[not found] ` <bdccb6a00911031019y48f1d1aax9be7b49e3463595@mail.gmail.com>
2009-11-04 19:57 ` Avery Pennarun
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).