Re: [git-users] Newbie: picking a commit from another repo

2015-05-28 Thread Tommaso Fonda
I found this command:

git fetch origin 

Could it work? I want to fetch some commits and then cherry-pick them in order 
to put them into my repo.

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [git-users] Newbie: picking a commit from another repo

2015-05-28 Thread Tommaso Fonda
Hi,
thank you for your answer. Creating a patch seems an interesting option. Do 
I still need to download the whole source code of C in order to create and 
apply a patch?

Il giorno mercoledì 27 maggio 2015 23:24:25 UTC+2, Magnus Therning ha 
scritto:
>
> On Wed, May 27, 2015 at 08:05:24AM -0700, Tommaso Fonda wrote: 
> > Good morrow, I have got a git repo (which I'll call A) forked from 
> > another repo (B) and I need to pick a commit that another person 
> > applied to his repo (C) which is also forked from B (although this 
> > shouldn't matter right?). I'm sure that the commit I want to apply 
> > to my repo won't generate conflicts. How can I do that? I added C 
> > with git add etc. but when running git fetch it downloads the whole 
> > repo which is very large. Is there a way to pick a commit from C and 
> > apply it to A? 
>
> I'm guessing you used `git remote add`, not `git add`, right? 
>
> I usually do use remotes to merge in changes from other clones.  If 
> you are worried about storage space you can always remove the remote 
> after you are done and kick git into doing a GC. 
>
> Another option is to create a patch file from the changes in C (look 
> at `git format-patch`) and then apply them in A (using `git am`). 
>
> /M 
>
> -- 
> Magnus Therning  OpenPGP: 0xAB4DFBA4 
> email: mag...@therning.orgjabber: mag...@therning.org 
>  
> twitter: magthe   http://therning.org/magnus 
>
> In a hierarchy, every employee tends to rise to his level of incompetence. 
>  -- The Peter Principle 
>

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [git-users] Newbie: picking a commit from another repo

2015-05-27 Thread Magnus Therning
On Wed, May 27, 2015 at 08:05:24AM -0700, Tommaso Fonda wrote:
> Good morrow, I have got a git repo (which I'll call A) forked from
> another repo (B) and I need to pick a commit that another person
> applied to his repo (C) which is also forked from B (although this
> shouldn't matter right?). I'm sure that the commit I want to apply
> to my repo won't generate conflicts. How can I do that? I added C
> with git add etc. but when running git fetch it downloads the whole
> repo which is very large. Is there a way to pick a commit from C and
> apply it to A?

I'm guessing you used `git remote add`, not `git add`, right?

I usually do use remotes to merge in changes from other clones.  If
you are worried about storage space you can always remove the remote
after you are done and kick git into doing a GC.

Another option is to create a patch file from the changes in C (look
at `git format-patch`) and then apply them in A (using `git am`).

/M

-- 
Magnus Therning  OpenPGP: 0xAB4DFBA4 
email: mag...@therning.org   jabber: mag...@therning.org
twitter: magthe   http://therning.org/magnus

In a hierarchy, every employee tends to rise to his level of incompetence.
 -- The Peter Principle

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


pgpQkho2yNHFj.pgp
Description: PGP signature


[git-users] Newbie: picking a commit from another repo

2015-05-27 Thread Tommaso Fonda
Good morrow, I have got a git repo (which I'll call A) forked from another 
repo (B) and I need to pick a commit that another person applied to his 
repo (C) which is also forked from B (although this shouldn't matter 
right?). I'm sure that the commit I want to apply to my repo won't generate 
conflicts. How can I do that? I added C with git add etc. but when running 
git fetch it downloads the whole repo which is very large. Is there a way 
to pick a commit from C and apply it to A?
Thanks.

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.