git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Teemu Likonen <tlikonen@iki.fi>
To: Nico -telmich- Schottelius <nico-git-20080606@schottelius.org>
Cc: git@vger.kernel.org
Subject: Re: How to compare different files in different branches
Date: Fri, 6 Jun 2008 15:35:39 +0300	[thread overview]
Message-ID: <20080606123539.GA3119@mithlond.arda.local> (raw)
In-Reply-To: <20080606122421.GA1521@denkbrett.schottelius.org>

Nico -telmich- Schottelius wrote (2008-06-06 14:24 +0200):

> I want to compare 'configure.in' from the master branch with
> 'configure.ac' from the gpm-2-dev branch.

You could do:

  $ git diff master:configure.in gpm-2-dev:configure.ac

In general form it means:

  $ git diff <commit1>:<path1> <commit2>:<path2>

You can also view directories and files similar way:

  $ git show <commit>:<path>


And <commit> can be anything that refers to a commit, e.g. a branch
name, a tag, SHA1 or a relative pointer like master^2~5.

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

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-06 12:24 How to compare different files in different branches Nico -telmich- Schottelius
2008-06-06 12:30 ` Jonathan del Strother
2008-06-06 12:34 ` Jakub Narebski
2008-06-06 12:38   ` Jakub Narebski
2008-06-06 12:35 ` Teemu Likonen [this message]
2008-06-08  9:47   ` Nico -telmich- Schottelius
2008-06-08  9:51     ` Junio C Hamano
2008-06-15  1:49       ` Ask Bjørn Hansen
2008-06-16 12:21       ` git-svn breaks svn when adding .svn Nico -telmich- Schottelius
     [not found]         ` <200806161603.05166.thomas@koch.ro>
2008-06-16 16:09           ` Frederik Dohr

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=20080606123539.GA3119@mithlond.arda.local \
    --to=tlikonen@iki.fi \
    --cc=git@vger.kernel.org \
    --cc=nico-git-20080606@schottelius.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).