Getting Commits from One Repository to Another

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Getting Commits from One Repository to Another

From: Big Lebowski <hidden>
Date: 2016-06-15 22:46:48

Hi all,

I hope this isn't a FAQ. I searched, and the closest thing in there  
(which may be what I want, but sounded wrong) was "How to share  
objects between existing repositories?" If that is it, then I  
apologize for the bandwidth.

Essentially, when I came on a project, a git repository was made  
available to me (lets call that 'public_repo'). That repository was  
put up on an unfuddle account, as an initial check-in; it was not  
cloned from the repository they were working on (lets call that  
'private_repo'). I wrote some code, and pushed it to the repository.  
Now that I guess they feel comfortable with me, they reveal to me the  
private_repo.

How do I get my code from public_repo to private_repo?

Thanks for helping a novice out.
Ryan

Re: Getting Commits from One Repository to Another

From: Jeff King <hidden>
Date: 2016-06-15 22:46:48

On Wed, May 20, 2009 at 07:37:54PM -0400, Big Lebowski wrote:
Essentially, when I came on a project, a git repository was made  
available to me (lets call that 'public_repo'). That repository was put up 
on an unfuddle account, as an initial check-in; it was not cloned from the 
repository they were working on (lets call that 'private_repo'). I wrote 
some code, and pushed it to the repository. Now that I guess they feel 
comfortable with me, they reveal to me the private_repo.

How do I get my code from public_repo to private_repo?
You could just repeat the push you made to public_repo to private_repo.
Or you could push to private_repo from public_repo, or pull from
public_repo to private_repo. One of the results of git's distributed
nature is that a commit is a commit is a commit. It doesn't matter where
it comes from: pushing or pulling the same commit (i.e., the same sha-1
commit id) will give the same results.

Does that make sense? If not, can you be more specific about the setup
(i.e., which commands were run to create public_repo and your personal
clone)? Without that, it's hard to offer more specific advice.

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help