threads / discuss / 23633

See commits on remote repository

Subject: See commits on remote repository

## tl;dr

4 messages between Apr 28, 2010 and Apr 29, 2010.

replies: 3people: 3as markdown or json

Bryan Richardson· Apr 28, 2010, 22:35 UTC · lore
Hello All,

Sorry if this question has been asked already. This mailing list is crazy active, and even after searching I couldn't find anything.

Is it possible to show commits to a remote repository that was created as a clone of a local repository, similar to how GitHub lets users view commits made to forked projects in a project's network?

For example, say I have repository X, which I do a bare clone on to create repository Y for someone else to work on (effectively forking repo X). Is there a way for me to see, from repository X, what commits have been made to repository Y?

-- Thanks! Bryan

Sylvain Rabot· Apr 28, 2010, 22:54 UTC · re: Bryan Richardson · lore

Re: See commits on remote repository

On Wed, 2010-04-28 at 16:35 -0600, Bryan Richardson wrote:
Show 17 quoted lines
> Hello All,
> 
> Sorry if this question has been asked already. This mailing list is
> crazy active, and even after searching I couldn't find anything.
> 
> Is it possible to show commits to a remote repository that was created
> as a clone of a local repository, similar to how GitHub lets users
> view commits made to forked projects in a project's network?
> 
> For example, say I have repository X, which I do a bare clone on to
> create repository Y for someone else to work on (effectively forking
> repo X). Is there a way for me to see, from repository X, what commits
> have been made to repository Y?
> 
> --
> Thanks!
> Bryan
Hi,

$ git remote update $ git log origin/<branch> $ gitk origin/<branch>

Regards.
-- 
Sylvain Rabot <sylvain@abstraction.fr>
Jeff King· Apr 29, 2010, 01:49 UTC · re: Sylvain Rabot · lore

Re: See commits on remote repository

On Thu, Apr 29, 2010 at 12:54:55AM +0200, Sylvain Rabot wrote:
Show 8 quoted lines
> > For example, say I have repository X, which I do a bare clone on to
> > create repository Y for someone else to work on (effectively forking
> > repo X). Is there a way for me to see, from repository X, what commits
> > have been made to repository Y?
> > 
> $ git remote update
> $ git log origin/<branch>
> $ gitk origin/<branch>

That's backwards. He's in the parent repo and wants to see what the child did.

The answer is "no, not automatically. Git is fully distributed and repository X knows nothing about repository Y that was cloned from it".

But also because git is fully distributed, you can simply treat the cloned child like any other remote:

  git remote add y /path/to/y
  git remote update ;# or just "git fetch y"
  git log y/<branch> ;# what happened in y's <branch>
  gitk y/<branch>...<branch> ;# differences since y forked
-Peff
Bryan Richardson· Apr 29, 2010, 02:44 UTC · re: Jeff King · lore

Re: See commits on remote repository

Sweetness... this will be most useful. Thanks to both you and Sylvain for responding!

On Wed, Apr 28, 2010 at 7:49 PM, Jeff King <peff@peff.net> wrote:
Show 27 quoted lines
> On Thu, Apr 29, 2010 at 12:54:55AM +0200, Sylvain Rabot wrote:
>
>> > For example, say I have repository X, which I do a bare clone on to
>> > create repository Y for someone else to work on (effectively forking
>> > repo X). Is there a way for me to see, from repository X, what commits
>> > have been made to repository Y?
>> >
>> $ git remote update
>> $ git log origin/<branch>
>> $ gitk origin/<branch>
>
> That's backwards. He's in the parent repo and wants to see what the
> child did.
>
> The answer is "no, not automatically. Git is fully distributed and
> repository X knows nothing about repository Y that was cloned from it".
>
> But also because git is fully distributed, you can simply treat the
> cloned child like any other remote:
>
>  git remote add y /path/to/y
>  git remote update ;# or just "git fetch y"
>  git log y/<branch> ;# what happened in y's <branch>
>  gitk y/<branch>...<branch> ;# differences since y forked
>
> -Peff
>

← back to recent threads