All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: "Erez Zilber" <erezzi.list@gmail.com>
Cc: "git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: Is there a way to diff between a local repository and a remote one?
Date: Sun, 29 Jun 2008 05:38:00 -0700 (PDT)	[thread overview]
Message-ID: <m38wwoifi7.fsf@localhost.localdomain> (raw)
In-Reply-To: <ce513bcc0806290429r1982fbf2i4c9a8258bc8db3c@mail.gmail.com>

"Erez Zilber" <erezzi.list@gmail.com> writes:

> Is there a way to diff between a local repository and a remote one?
>
> I could clone the remote repository and use Linux's diff, but I prefer
> to do it the right way (if possible).

There is no way to do this remotely; you have to download either
snapshot (tarball) of remote repository (either from gitweb interface
or other web interface if snapshot feature is enabled, or using 
"git archive --remote=<repo> <version>" (where <version> might be "HEAD")
if it is enabled on remote), or fetch / shallow fetch / shallow clone
of repository.

If local repository you want to diff is related to remote repository,
the simplest way would be to fetch (or shallow fetch) the repository
you want to compare into your repository, either using

  $ git remote add -f <nick> <URL>
  $ git diff HEAD <nick> #; or <nick>/HEAD, or <nick>/master

or

  $ git fetch --no-tags <URL> <branch> #; you can add --depth=1
  $ git diff HEAD FETCH_HEAD

(of course all above being in local repository; you can replace HEAD
by local revision you want to compare)
-- 
Jakub Narebski
Poland
ShadeHawk on #git

      parent reply	other threads:[~2008-06-29 12:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-29 11:29 Is there a way to diff between a local repository and a remote one? Erez Zilber
2008-06-29 11:55 ` Boaz Harrosh
2008-06-29 12:19   ` Erez Zilber
2008-06-29 12:38 ` Jakub Narebski [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m38wwoifi7.fsf@localhost.localdomain \
    --to=jnareb@gmail.com \
    --cc=erezzi.list@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.