[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: git: how to figure out with a script what the last commit on remote repo is without fetching it



2014/09/08 2:08 "lee" <lee@yun.yagibdah.de>:
>
> Sven Joachim <svenjoac@gmx.de> writes:
>
> >> Does this mean that I cannot rely on any of the output of 'git status'
> >> to decide whether there were commits or not?
> >
> > Commits where, on your local branch or on the remote one?
>
> On the remote branch --- when they are made to my local copy, I will
> know about it anyway because I'm the one making them :)

I'm no expert on this stuff, but from the way you talk about commits and branches and repositories, it sounds like you are expecting git to be pretty much the same as svn. It isn't.

How much of the documentation have you read, and how many of the examples have you worked through, and why aren't you using svn or cvs instead?

> >>> How about "git fetch --dry-run"?
> >>
> >> That doesn't seem to do a dry run:
> > [...]
> >>
> >> The first run compresses and unpacks some objects while the second one
> >> immediately after the first one does not.  This must mean that something
> >> did change by performing a dry run.
> >
> > Correct, contrary to what the manpage says "git fetch --dry-run" still
> > downloads a pack file with the objects.  It just does not update any
> > refs.
>
> Then there is no reasonably way to find out whether new commits have
> been made to a remote repo?

Yes there is, it's just not done that way.

Joel Rees

Computer memory is just fancy paper,
CPUs just fancy pens.
All is a stream of text
flowing from the past into the future.


Reply to: