git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: gitk highlighting commits

From
JHJan Hudec <bulb@ucw.cz>
Date
Jun 8, 2007, 21:11 UTC
Message-ID
<20070608211133.GB4084@efreet.light.src>
In-Reply-To
<20070608065739.GC18521@spearce.org>
On Fri, Jun 08, 2007 at 02:57:39 -0400, Shawn O. Pearce wrote:
Show 21 quoted lines
> picca <picca@synchrotron-soleil.Fr> wrote:
> > I am using git to follow the wine development. And I wondering if it
> > is possible to highlight all the commit since my last git pull ?
> 
> If you do it *right after* the pull, you can see those commits that
> are new to you with:
> 
> 	gitk ORIG_HEAD..
> 
> ORIG_HEAD is a special name for the commit that you had just before
> you pulled.  So you are asking gitk to show you all commits that
> are now in your current branch (implied by nothing to the right of
> the ..) that were not in your branch before the pull (ORIG_HEAD).
> That is the stuff you just pullled.
> 
> If its many days later that you want to look at this and you have
> done some things that overwrite ORIG_HEAD (git reset; git rebase;
> etc.)  then this becomes more difficult.  But you can also do by
> time:
> 
>   gitk HEAD@{2.days.ago}..

There is actually one ref which only changes in pulls (and fetches) -- the tracking brach. Therefore:

gitk origin/master@{1}..
(or whatever you pull) is what you want.
Show 12 quoted lines
> This shows you everything that is new *to you* in the past two days.
> Even if the changes were created months ago and just recently were
> pulled by you yesterday, they will appear in gitk, because you asked
> for *your* history over the past two days, not the project history.
> 
> These same tricks also work with git-log of course:
> 
>   git log ORIG_HEAD...
>   git log HEAD@{2.days.ago}..
> 
> You could also take a look at the manual page for git-rev-parse,
> there are some more details covered there I think.
-- 
						 Jan 'Bulb' Hudec <bulb@ucw.cz>
Previous: Shawn O. Pearce
Message 4 of 4 in “gitk highlighting commits”
  1. piccaJun 8, 2007
  2. Marius Storm-OlsenJun 8, 2007
  3. Shawn O. PearceJun 8, 2007
  4. Jan HudecJun 8, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.