[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gits] Git question about local version diffs
- Subject: [gits] Git question about local version diffs
- From: ricci at cs.utah.edu (Robert Ricci)
- Date: Fri, 22 Feb 2013 12:36:05 -0700
- In-reply-to: <CAHhYwBiiOfa7kfrNB9Pxq=mVVREwTLcPkPdLjtzPeDN5efCz-Q@mail.gmail.com>
- References: <CAJz08q_Q6OQUmn2cibWhNx6dm-uBb3Z1RGKLH+OWddr4jD9-JA@mail.gmail.com> <CAHhYwBiiOfa7kfrNB9Pxq=mVVREwTLcPkPdLjtzPeDN5efCz-Q@mail.gmail.com>
git diff master origin/master
if you want to see the different between your *current* committed state
and the upstream
(git diff uses the same argument order as 'regular' diff, so you might
want to reverse master and origin/master)
On 22 Feb 2013, at 12:20, Kirk Webb wrote:
> You can list the commit hashes with 'git log', then use them, or a
> relative reference to them (e.g. 'HEAD~2') to provide to 'git diff'
> like so:
> git diff <commit_hash> origin/master # assuming you are working on
> the master branch
> git diff HEAD~2 origin/master
> On Fri, Feb 22, 2013 at 11:50 AM, Dan Reading <dreading at flux.utah.edu>
>> How do I get a list of my local commits and display diffs.
>> For example if I do a 'get status' it says that I'm 4 commits ahead
>> the master ( I have not done a 'git push' ).
>> I would like select two of the commits and see the diffs of the