Re: git: how to figure out with a script what the last commit on remote repo is without fetching it
On Sat, Sep 6, 2014 at 7:04 AM, lee <lee@yun.yagibdah.de> wrote:
> Hi,
>
> how would I figure out what the last commit to a remote repo was without
> first fetching or pulling the remote repo?
>
> Assume that I have a local copy, say cloned yesterday. Today I would
> like to be informed automatically of new commits without fetching or
> pulling from the remote repo. It would suffice to know whether there
> have been new commits or not.
>
>
> 'git log -1 --date=relative --format=%at' gives me a very useful output
> for my local instance of the repo, but there doesn't seem to be any way
> to get this kind of output for the remote repo. Or is there?
>
>
> --
> Knowledge is volatile and fluid. Software is power.
The more I think about this, the more I think you are trying to do
something the hard way.
Is setting your head and running a diff or status insufficient? If so,
I'm tending to think you might want two local repositories, one to
track the remote, and one that you work in.
--
Joel Rees
Be careful where you see conspiracy.
Look first in your own heart,
and ask yourself if you are not your own worst enemy.
Reply to: