All of lore.kernel.org
 help / color / mirror / Atom feed
* using merge subtree and move it..
@ 2008-09-09  0:21 SungHyun Nam
  2008-09-09  6:56 ` Johannes Sixt
  0 siblings, 1 reply; 4+ messages in thread
From: SungHyun Nam @ 2008-09-09  0:21 UTC (permalink / raw)
  To: git

Hello,

I used the subtree merge strategy. And then I moved the directory.
Now, can I use subtree merge for that new directory?

I just tried 'read-tree'.. (klib was in 'libs/klib').

$ git read-tree --prefix=klib/ -u klib/master
error: Entry 'klib/Makefile' overlaps with 'klib/Makefile'.  Cannot bind.

Hmm.. just tried subtree merge..

$ git pull -s subtree klib master
remote: Counting objects: 5, done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 3 (delta 1), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done.
 From ssh://192.168.10.10/git/libs/klib
  * branch            master     -> FETCH_HEAD
error: Entry 'klib/klib.c' not uptodate. Cannot merge.
fatal: merging of trees 31dd1721641a25bfb0225138a34c43483d870377 and 
bccba7da98b042817fdbd92c62b706919216b571 failed
Merge with strategy subtree failed.

Thanks,
namsh

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: using merge subtree and move it..
  2008-09-09  0:21 using merge subtree and move it SungHyun Nam
@ 2008-09-09  6:56 ` Johannes Sixt
  2008-09-09  9:59   ` SungHyun Nam
  0 siblings, 1 reply; 4+ messages in thread
From: Johannes Sixt @ 2008-09-09  6:56 UTC (permalink / raw)
  To: SungHyun Nam; +Cc: git

SungHyun Nam schrieb:
> I used the subtree merge strategy. And then I moved the directory.
> Now, can I use subtree merge for that new directory?

Sure. It should work just fine.

> $ git pull -s subtree klib master
> remote: Counting objects: 5, done.
> remote: Compressing objects: 100% (2/2), done.
> remote: Total 3 (delta 1), reused 0 (delta 0)
> Unpacking objects: 100% (3/3), done.
> From ssh://192.168.10.10/git/libs/klib
>  * branch            master     -> FETCH_HEAD
> error: Entry 'klib/klib.c' not uptodate. Cannot merge.

Your problem is not related to subtree merge. Make sure you have no
changes to commit before you merge.

> fatal: merging of trees 31dd1721641a25bfb0225138a34c43483d870377 and
> bccba7da98b042817fdbd92c62b706919216b571 failed
> Merge with strategy subtree failed.

-- Hannes

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: using merge subtree and move it..
  2008-09-09  6:56 ` Johannes Sixt
@ 2008-09-09  9:59   ` SungHyun Nam
  2009-11-03  2:57     ` Milos Jakubicek
  0 siblings, 1 reply; 4+ messages in thread
From: SungHyun Nam @ 2008-09-09  9:59 UTC (permalink / raw)
  To: git

Johannes Sixt wrote:
> SungHyun Nam schrieb:
>> I used the subtree merge strategy. And then I moved the directory.
>> Now, can I use subtree merge for that new directory?
> 
> Sure. It should work just fine.
> 
>> $ git pull -s subtree klib master
>> remote: Counting objects: 5, done.
>> remote: Compressing objects: 100% (2/2), done.
>> remote: Total 3 (delta 1), reused 0 (delta 0)
>> Unpacking objects: 100% (3/3), done.
>> From ssh://192.168.10.10/git/libs/klib
>>  * branch            master     -> FETCH_HEAD
>> error: Entry 'klib/klib.c' not uptodate. Cannot merge.
> 
> Your problem is not related to subtree merge. Make sure you have no
> changes to commit before you merge.

It seems I forgot to commit after running 'git mv lib/klib klib'.
Oops! :( I'm not sure because the problem gone after I did some
stupid things.  The 'some stupid things' include 'git rm -rf klib;
...; git remote rm klib and re-doing using-merge-subtree.....'.

BTW, I have no idea how I can push 'local changes in subtree' to remote.
The 'Additional tips' in using-merge-subtree.txt said it is
possible using subtree. But don't know how? Could someone show me
a sample command/setup sequence?

Thanks,
namsh

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: using merge subtree and move it..
  2008-09-09  9:59   ` SungHyun Nam
@ 2009-11-03  2:57     ` Milos Jakubicek
  0 siblings, 0 replies; 4+ messages in thread
From: Milos Jakubicek @ 2009-11-03  2:57 UTC (permalink / raw)
  To: git




SungHyun Nam wrote:
> 
> 
> BTW, I have no idea how I can push 'local changes in subtree' to remote.
> The 'Additional tips' in using-merge-subtree.txt said it is
> possible using subtree. But don't know how? Could someone show me
> a sample command/setup sequence?
> 

I found out: 
edit your .git/config file and in the [remote "remotename"] section, copy
the "fetch =" line as "push =" line (with same content after "="). Then by
"git push remotename" you'll just push the relevant subtree.
-- 
View this message in context: http://n2.nabble.com/using-merge-subtree-and-move-it-tp1076542p3936273.html
Sent from the git mailing list archive at Nabble.com.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-11-03  2:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-09  0:21 using merge subtree and move it SungHyun Nam
2008-09-09  6:56 ` Johannes Sixt
2008-09-09  9:59   ` SungHyun Nam
2009-11-03  2:57     ` Milos Jakubicek

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.