[git-users] Re: git help about git merge to a specific dir and keep the commit log

2012-12-10 Thread John McKown
I think this is similar to what I gave to a post a couple of days ago. You 
might try the following on your local machine. I will show the commands 
that I would enter in a Linux BASH shell. I don't do Windows or MacOSX, but 
you seem to be on Ubuntu.. First, I would clone the B repository into a 
local working directory. I would then clone A into a different local 
working directory. Of course, double check the results of all the commands 
after doing them and stop if something goes wrong. I have not redone them 
myself to remind myself exactly what to do. It's why I'm showing doing this 
into new subdirectories. Make sure the new B working directory is good 
before pushing to github!

cd ~/some-subdir #go someplace to make the new A and B working directories
git clone git://github.com/lei/A.git
git clone git://github.com/lei/B.git
cd A
git checkout -b kvm #make a new branch in A
mkdir kvm #make a kvm directory for A
git mv * kvm #move everything into it
git commit -m 'move to kvm subdirectory for copy to B' #Needed???
cd ../B #go to the B subdirectory
git remote add temp ../A/.git #make A's .git directory a remote here
git merge --no-commit temp kvm #merge in A's kvm branch
git commit -m 'Copy all of kvm from project A'
git remote rm temp #remove that temp repository
git push #update github.

I think that is fairly close to what you may need. Perhaps one of the true 
old, wise ones (I'm an old, not-so-wise one) will also give you some 
pointers.

On Monday, December 10, 2012 2:35:58 AM UTC-6, lei yang wrote:

 Hi experts, 

 I have two tree A and B, 
 A: git://github.com/lei/A.git 
 B: git://github.com/lei/B.git 

 B is like 
 [lyang0@ubuntu B]$ ls 
 benchmark  box-opening  kvm 

 I want merge A tree to B, 
 1) put A's content to the kvm directory of B 
 2)I want to keep all the A's commit log(history) into B's tree 

 can you give me some instruction?  Thanks 

 Lei 


-- 




[git-users] Re: git help about git merge to a specific dir and keep the commit log

2012-12-10 Thread John McKown
possible mini bug, instead of:

git mv * kvm

use

git mv \* kvm

The \ in front of the * tells git to expand the file names instead of 
having the shell do it. My mistake.

On Monday, December 10, 2012 2:35:58 AM UTC-6, lei yang wrote:

 Hi experts, 

 I have two tree A and B, 
 A: git://github.com/lei/A.git 
 B: git://github.com/lei/B.git 

 B is like 
 [lyang0@ubuntu B]$ ls 
 benchmark  box-opening  kvm 

 I want merge A tree to B, 
 1) put A's content to the kvm directory of B 
 2)I want to keep all the A's commit log(history) into B's tree 

 can you give me some instruction?  Thanks 

 Lei 


-- 




Re: [git-users] git help about git merge to a specific dir and keep the commit log

2012-12-10 Thread Konstantin Khomoutov
On Mon, 10 Dec 2012 16:35:58 +0800
lei yang yanglei.f...@gmail.com wrote:

 I have two tree A and B,
 A: git://github.com/lei/A.git
 B: git://github.com/lei/B.git
 
 B is like
 [lyang0@ubuntu B]$ ls
 benchmark  box-opening  kvm
 
 I want merge A tree to B,
 1) put A's content to the kvm directory of B
 2)I want to keep all the A's commit log(history) into B's tree
 
 can you give me some instruction?  Thanks

This is what the add commmand of git-subtree [1] does.
Note that since 1.7.11, this script is included in Git, in its
contrib directory, so it's callable from there.

1. https://github.com/apenwarr/git-subtree

-- 




Re: [git-users] Digest for git-users@googlegroups.com - 4 Messages in 1 Topic

2012-12-10 Thread King Jin
git submodule might be the one you are looking for.

$git clone git://github.com/lei/B.git B
$cd B
$git submodule add git://github.com/lei/A.git kvm
$git submodule update

anyone else cloned your repo B, just run `git submodule update` (exclude `)
will get the commit history of repo A by changing current working directory
to kvm and run git log.

On Tue, Dec 11, 2012 at 8:49 AM, git-users@googlegroups.com wrote:

   Today's Topic Summary

 Group: http://groups.google.com/group/git-users/topics

- git help about git merge to a specific dir and keep the commit 
 log#13b87707a549340d_group_thread_0[4 Updates]

   git help about git merge to a specific dir and keep the commit 
 loghttp://groups.google.com/group/git-users/t/6005859f409bc7f9

lei yang yanglei.f...@gmail.com Dec 10 04:35PM +0800

Hi experts,

I have two tree A and B,
A: git://github.com/lei/A.git
B: git://github.com/lei/B.git

B is like
[lyang0@ubuntu B]$ ls
benchmark box-opening kvm

I want merge A tree to B,
1) put A's content to the kvm directory of B
2)I want to keep all the A's commit log(history) into B's tree

can you give me some instruction? Thanks

Lei




John McKown john.archie.mck...@gmail.com Dec 10 06:42AM -0800

I think this is similar to what I gave to a post a couple of days ago.
You
might try the following on your local machine. I will show the
commands
that I would enter in a Linux BASH shell. I don't do Windows or
MacOSX, but
you seem to be on Ubuntu.. First, I would clone the B repository into
a
local working directory. I would then clone A into a different local
working directory. Of course, double check the results of all the
commands
after doing them and stop if something goes wrong. I have not redone
them
myself to remind myself exactly what to do. It's why I'm showing doing
this
into new subdirectories. Make sure the new B working directory is good
before pushing to github!

cd ~/some-subdir #go someplace to make the new A and B working
directories
git clone git://github.com/lei/A.git
git clone git://github.com/lei/B.git
cd A
git checkout -b kvm #make a new branch in A
mkdir kvm #make a kvm directory for A
git mv * kvm #move everything into it
git commit -m 'move to kvm subdirectory for copy to B' #Needed???
cd ../B #go to the B subdirectory
git remote add temp ../A/.git #make A's .git directory a remote here
git merge --no-commit temp kvm #merge in A's kvm branch
git commit -m 'Copy all of kvm from project A'
git remote rm temp #remove that temp repository
git push #update github.

I think that is fairly close to what you may need. Perhaps one of the
true
old, wise ones (I'm an old, not-so-wise one) will also give you
some
pointers.

On Monday, December 10, 2012 2:35:58 AM UTC-6, lei yang wrote:




John McKown john.archie.mck...@gmail.com Dec 10 08:12AM -0800

possible mini bug, instead of:

git mv * kvm

use

git mv \* kvm

The \ in front of the * tells git to expand the file names instead of
having the shell do it. My mistake.

On Monday, December 10, 2012 2:35:58 AM UTC-6, lei yang wrote:




Konstantin Khomoutov flatw...@users.sourceforge.net Dec 10 08:30PM
+0400

On Mon, 10 Dec 2012 16:35:58 +0800
 1) put A's content to the kvm directory of B
 2)I want to keep all the A's commit log(history) into B's tree

 can you give me some instruction? Thanks

This is what the add commmand of git-subtree [1] does.
Note that since 1.7.11, this script is included in Git, in its
contrib directory, so it's callable from there.

1. https://github.com/apenwarr/git-subtree



  You received this message because you are subscribed to the Google Group
 git-users.
 You can post via email git-users@googlegroups.com.
 To unsubscribe from this group, 
 sendgit-users+unsubscr...@googlegroups.coman empty message.
 For more options, visit http://groups.google.com/group/git-users/topicsthis 
 group.

 --




-- 




Re: [git-users] Digest for git-users@googlegroups.com - 4 Messages in 1 Topic

2012-12-10 Thread lei yang
On Tue, Dec 11, 2012 at 10:02 AM, King Jin jinking.t...@gmail.com wrote:
 git submodule might be the one you are looking for.

 $git clone git://github.com/lei/B.git B
 $cd B
 $git submodule add git://github.com/lei/A.git kvm
 $git submodule update


Thanks it works for me, and if I do a 'git push', and then clone it to local
and git pull, does it update the kvm part if kvm part has update?

Lei

 anyone else cloned your repo B, just run `git submodule update` (exclude `)
 will get the commit history of repo A by changing current working directory
 to kvm and run git log.

 On Tue, Dec 11, 2012 at 8:49 AM, git-users@googlegroups.com wrote:

   Today's Topic Summary

 Group: http://groups.google.com/group/git-users/topics

 git help about git merge to a specific dir and keep the commit log [4
 Updates]

  git help about git merge to a specific dir and keep the commit log

 lei yang yanglei.f...@gmail.com Dec 10 04:35PM +0800

 Hi experts,

 I have two tree A and B,
 A: git://github.com/lei/A.git
 B: git://github.com/lei/B.git

 B is like
 [lyang0@ubuntu B]$ ls
 benchmark box-opening kvm

 I want merge A tree to B,
 1) put A's content to the kvm directory of B
 2)I want to keep all the A's commit log(history) into B's tree

 can you give me some instruction? Thanks

 Lei



 John McKown john.archie.mck...@gmail.com Dec 10 06:42AM -0800

 I think this is similar to what I gave to a post a couple of days ago. You
 might try the following on your local machine. I will show the commands
 that I would enter in a Linux BASH shell. I don't do Windows or MacOSX,
 but
 you seem to be on Ubuntu.. First, I would clone the B repository into a
 local working directory. I would then clone A into a different local
 working directory. Of course, double check the results of all the commands
 after doing them and stop if something goes wrong. I have not redone them
 myself to remind myself exactly what to do. It's why I'm showing doing
 this
 into new subdirectories. Make sure the new B working directory is good
 before pushing to github!

 cd ~/some-subdir #go someplace to make the new A and B working directories
 git clone git://github.com/lei/A.git
 git clone git://github.com/lei/B.git
 cd A
 git checkout -b kvm #make a new branch in A
 mkdir kvm #make a kvm directory for A
 git mv * kvm #move everything into it
 git commit -m 'move to kvm subdirectory for copy to B' #Needed???
 cd ../B #go to the B subdirectory
 git remote add temp ../A/.git #make A's .git directory a remote here
 git merge --no-commit temp kvm #merge in A's kvm branch
 git commit -m 'Copy all of kvm from project A'
 git remote rm temp #remove that temp repository
 git push #update github.

 I think that is fairly close to what you may need. Perhaps one of the true
 old, wise ones (I'm an old, not-so-wise one) will also give you some
 pointers.

 On Monday, December 10, 2012 2:35:58 AM UTC-6, lei yang wrote:



 John McKown john.archie.mck...@gmail.com Dec 10 08:12AM -0800

 possible mini bug, instead of:

 git mv * kvm

 use

 git mv \* kvm

 The \ in front of the * tells git to expand the file names instead of
 having the shell do it. My mistake.

 On Monday, December 10, 2012 2:35:58 AM UTC-6, lei yang wrote:



 Konstantin Khomoutov flatw...@users.sourceforge.net Dec 10 08:30PM +0400

 On Mon, 10 Dec 2012 16:35:58 +0800
  1) put A's content to the kvm directory of B
  2)I want to keep all the A's commit log(history) into B's tree

  can you give me some instruction? Thanks

 This is what the add commmand of git-subtree [1] does.
 Note that since 1.7.11, this script is included in Git, in its
 contrib directory, so it's callable from there.

 1. https://github.com/apenwarr/git-subtree



 You received this message because you are subscribed to the Google Group
 git-users.
 You can post via email.
 To unsubscribe from this group, send an empty message.
 For more options, visit this group.

 --




 --



-- 




Re: [git-users] Re: git help about git merge to a specific dir and keep the commit log

2012-12-10 Thread lei yang
Thanks it works for me, It maybe mv kvm: itself to kvm dir, anyway
you instruction perform well for me
thanks again and I will try git mv \* kvm

Lei


On Tue, Dec 11, 2012 at 12:12 AM, John McKown
john.archie.mck...@gmail.com wrote:
 possible mini bug, instead of:

 git mv * kvm

 use

 git mv \* kvm

 The \ in front of the * tells git to expand the file names instead of having
 the shell do it. My mistake.


 On Monday, December 10, 2012 2:35:58 AM UTC-6, lei yang wrote:

 Hi experts,

 I have two tree A and B,
 A: git://github.com/lei/A.git
 B: git://github.com/lei/B.git

 B is like
 [lyang0@ubuntu B]$ ls
 benchmark  box-opening  kvm

 I want merge A tree to B,
 1) put A's content to the kvm directory of B
 2)I want to keep all the A's commit log(history) into B's tree

 can you give me some instruction?  Thanks

 Lei

 --



-- 




Re: [git-users] Digest for git-users@googlegroups.com - 4 Messages in 1 Topic

2012-12-10 Thread William Mizuta
You need to realize a git submodule update to update your kvm part.
Remember that you need to push your kvm project change and your main
project.

You can check this site ( http://git-scm.com/book/en/Git-Tools-Submodules )
for more information about git submodule.


William Seiti Mizuta
@williammizuta
Desenvolvedor da Caelum



On Tue, Dec 11, 2012 at 1:00 AM, lei yang yanglei.f...@gmail.com wrote:

 On Tue, Dec 11, 2012 at 10:02 AM, King Jin jinking.t...@gmail.com wrote:
  git submodule might be the one you are looking for.
 
  $git clone git://github.com/lei/B.git B
  $cd B
  $git submodule add git://github.com/lei/A.git kvm
  $git submodule update
 

 Thanks it works for me, and if I do a 'git push', and then clone it to
 local
 and git pull, does it update the kvm part if kvm part has update?

 Lei

  anyone else cloned your repo B, just run `git submodule update` (exclude
 `)
  will get the commit history of repo A by changing current working
 directory
  to kvm and run git log.
 
  On Tue, Dec 11, 2012 at 8:49 AM, git-users@googlegroups.com wrote:
 
Today's Topic Summary
 
  Group: http://groups.google.com/group/git-users/topics
 
  git help about git merge to a specific dir and keep the commit log [4
  Updates]
 
   git help about git merge to a specific dir and keep the commit log
 
  lei yang yanglei.f...@gmail.com Dec 10 04:35PM +0800
 
  Hi experts,
 
  I have two tree A and B,
  A: git://github.com/lei/A.git
  B: git://github.com/lei/B.git
 
  B is like
  [lyang0@ubuntu B]$ ls
  benchmark box-opening kvm
 
  I want merge A tree to B,
  1) put A's content to the kvm directory of B
  2)I want to keep all the A's commit log(history) into B's tree
 
  can you give me some instruction? Thanks
 
  Lei
 
 
 
  John McKown john.archie.mck...@gmail.com Dec 10 06:42AM -0800
 
  I think this is similar to what I gave to a post a couple of days ago.
 You
  might try the following on your local machine. I will show the commands
  that I would enter in a Linux BASH shell. I don't do Windows or MacOSX,
  but
  you seem to be on Ubuntu.. First, I would clone the B repository into a
  local working directory. I would then clone A into a different local
  working directory. Of course, double check the results of all the
 commands
  after doing them and stop if something goes wrong. I have not redone
 them
  myself to remind myself exactly what to do. It's why I'm showing doing
  this
  into new subdirectories. Make sure the new B working directory is good
  before pushing to github!
 
  cd ~/some-subdir #go someplace to make the new A and B working
 directories
  git clone git://github.com/lei/A.git
  git clone git://github.com/lei/B.git
  cd A
  git checkout -b kvm #make a new branch in A
  mkdir kvm #make a kvm directory for A
  git mv * kvm #move everything into it
  git commit -m 'move to kvm subdirectory for copy to B' #Needed???
  cd ../B #go to the B subdirectory
  git remote add temp ../A/.git #make A's .git directory a remote here
  git merge --no-commit temp kvm #merge in A's kvm branch
  git commit -m 'Copy all of kvm from project A'
  git remote rm temp #remove that temp repository
  git push #update github.
 
  I think that is fairly close to what you may need. Perhaps one of the
 true
  old, wise ones (I'm an old, not-so-wise one) will also give you some
  pointers.
 
  On Monday, December 10, 2012 2:35:58 AM UTC-6, lei yang wrote:
 
 
 
  John McKown john.archie.mck...@gmail.com Dec 10 08:12AM -0800
 
  possible mini bug, instead of:
 
  git mv * kvm
 
  use
 
  git mv \* kvm
 
  The \ in front of the * tells git to expand the file names instead of
  having the shell do it. My mistake.
 
  On Monday, December 10, 2012 2:35:58 AM UTC-6, lei yang wrote:
 
 
 
  Konstantin Khomoutov flatw...@users.sourceforge.net Dec 10 08:30PM
 +0400
 
  On Mon, 10 Dec 2012 16:35:58 +0800
   1) put A's content to the kvm directory of B
   2)I want to keep all the A's commit log(history) into B's tree
 
   can you give me some instruction? Thanks
 
  This is what the add commmand of git-subtree [1] does.
  Note that since 1.7.11, this script is included in Git, in its
  contrib directory, so it's callable from there.
 
  1. https://github.com/apenwarr/git-subtree
 
 
 
  You received this message because you are subscribed to the Google Group
  git-users.
  You can post via email.
  To unsubscribe from this group, send an empty message.
  For more options, visit this group.
 
  --
 
 
 
 
  --
 
 

 --




-- 




Re: [git-users] Digest for git-users@googlegroups.com - 4 Messages in 1 Topic

2012-12-10 Thread William Mizuta
What do you get when you use git submodule update?


William Seiti Mizuta
@williammizuta
Desenvolvedor da Caelum



On Tue, Dec 11, 2012 at 1:22 AM, lei yang yanglei.f...@gmail.com wrote:

 On Tue, Dec 11, 2012 at 11:00 AM, lei yang yanglei.f...@gmail.com wrote:
  On Tue, Dec 11, 2012 at 10:02 AM, King Jin jinking.t...@gmail.com
 wrote:
  git submodule might be the one you are looking for.
 
  $git clone git://github.com/lei/B.git B
  $cd B
  $git submodule add git://github.com/lei/A.git kvm
  $git submodule update
 
 
  Thanks it works for me, and if I do a 'git push', and then clone it to
 local
  and git pull, does it update the kvm part if kvm part has update?

 I just did a try, it doesn't update the kvm dir,how can I Do a git
 pull in B an then it can update
 kvm dir in B

 Lei


 
  Lei
 
  anyone else cloned your repo B, just run `git submodule update`
 (exclude `)
  will get the commit history of repo A by changing current working
 directory
  to kvm and run git log.
 
  On Tue, Dec 11, 2012 at 8:49 AM, git-users@googlegroups.com wrote:
 
Today's Topic Summary
 
  Group: http://groups.google.com/group/git-users/topics
 
  git help about git merge to a specific dir and keep the commit log [4
  Updates]
 
   git help about git merge to a specific dir and keep the commit log
 
  lei yang yanglei.f...@gmail.com Dec 10 04:35PM +0800
 
  Hi experts,
 
  I have two tree A and B,
  A: git://github.com/lei/A.git
  B: git://github.com/lei/B.git
 
  B is like
  [lyang0@ubuntu B]$ ls
  benchmark box-opening kvm
 
  I want merge A tree to B,
  1) put A's content to the kvm directory of B
  2)I want to keep all the A's commit log(history) into B's tree
 
  can you give me some instruction? Thanks
 
  Lei
 
 
 
  John McKown john.archie.mck...@gmail.com Dec 10 06:42AM -0800
 
  I think this is similar to what I gave to a post a couple of days ago.
 You
  might try the following on your local machine. I will show the commands
  that I would enter in a Linux BASH shell. I don't do Windows or MacOSX,
  but
  you seem to be on Ubuntu.. First, I would clone the B repository into a
  local working directory. I would then clone A into a different local
  working directory. Of course, double check the results of all the
 commands
  after doing them and stop if something goes wrong. I have not redone
 them
  myself to remind myself exactly what to do. It's why I'm showing doing
  this
  into new subdirectories. Make sure the new B working directory is good
  before pushing to github!
 
  cd ~/some-subdir #go someplace to make the new A and B working
 directories
  git clone git://github.com/lei/A.git
  git clone git://github.com/lei/B.git
  cd A
  git checkout -b kvm #make a new branch in A
  mkdir kvm #make a kvm directory for A
  git mv * kvm #move everything into it
  git commit -m 'move to kvm subdirectory for copy to B' #Needed???
  cd ../B #go to the B subdirectory
  git remote add temp ../A/.git #make A's .git directory a remote here
  git merge --no-commit temp kvm #merge in A's kvm branch
  git commit -m 'Copy all of kvm from project A'
  git remote rm temp #remove that temp repository
  git push #update github.
 
  I think that is fairly close to what you may need. Perhaps one of the
 true
  old, wise ones (I'm an old, not-so-wise one) will also give you
 some
  pointers.
 
  On Monday, December 10, 2012 2:35:58 AM UTC-6, lei yang wrote:
 
 
 
  John McKown john.archie.mck...@gmail.com Dec 10 08:12AM -0800
 
  possible mini bug, instead of:
 
  git mv * kvm
 
  use
 
  git mv \* kvm
 
  The \ in front of the * tells git to expand the file names instead of
  having the shell do it. My mistake.
 
  On Monday, December 10, 2012 2:35:58 AM UTC-6, lei yang wrote:
 
 
 
  Konstantin Khomoutov flatw...@users.sourceforge.net Dec 10 08:30PM
 +0400
 
  On Mon, 10 Dec 2012 16:35:58 +0800
   1) put A's content to the kvm directory of B
   2)I want to keep all the A's commit log(history) into B's tree
 
   can you give me some instruction? Thanks
 
  This is what the add commmand of git-subtree [1] does.
  Note that since 1.7.11, this script is included in Git, in its
  contrib directory, so it's callable from there.
 
  1. https://github.com/apenwarr/git-subtree
 
 
 
  You received this message because you are subscribed to the Google
 Group
  git-users.
  You can post via email.
  To unsubscribe from this group, send an empty message.
  For more options, visit this group.
 
  --
 
 
 
 
  --
 
 

 --




-- 




[git-users] ls it possible to change the commit info

2012-12-10 Thread lei yang
HI experts

my git log is something like
#git log




commit a83052d1f102341bb5931955658266882d7b8953
Author: Lei Yang yanglei.f...@gmail.com
Date:   Tue Dec 11 13:36:45 2012 +0800

add testfileA2.add

commit b8558af3986384e657bfdbc48154830395b340c6
Author: Lei Yang yanglei.f...@gmail.com
Date:   Tue Dec 11 13:30:10 2012 +0800

rm testfileA1.add

commit ad9d46d348542bb4b7d8d09fbe6b4a6548cb68ff
Merge: acaa35d aaa479a
Author: Lei Yang yanglei.f...@gmail.com
Date:   Tue Dec 11 13:37:01 2012 +0800

Merge branch 'master' of github.com:leiyang/git_testA


I find rm testfileA1.add is wrong, I want to change it to add
testfileA1.add, and DON'T leave rm testfileA1.add info in the
commit log
Is it possible?

Lei

--