Alex Rivera | Logout

git: Is there a command line option for "Sort by date" for gitk?

Asked 2011-11-18T19:08:04.943
17

I'm trying to find a command line option for gitk that has the same effect of "Strictly sort by date" in the "View / Edit view..." window.

man gitk shows a very limited number of options compared to those available in the GUI.

Edit
Report

1 Answer

18

The man gitk at least mentions it does take the same options than git rev-list, including

--date-order 

This option is similar to --topo-order in the sense that no parent comes before all of its children, but otherwise things are still ordered in the commit timestamp order.

See "Guide to understanding gitk?" for more.


Note: if -d or --date-order is really the argument you are after, better not using too much, according to Linus himself (from lists-archives.com/git or www.spinics.net/lists/git/):

The thing is, --date-order strings out and mixes up the commits on the same development chain, and by doing so it makes the different chains of development much harder to see.
It also ends up showing the development in a more "parallel" way, which in turn makes the view even harder to read.

So I would suggest not using --date-order by default. It doesn't add anything to any normal flow, and it makes the big picture harder to see.

The only time you really want --date-order (or "-d", which is shorthand for it for just gitk) is really

  • when the big picture is really really simple, and you actually want to see more detail because the big picture is too trivial to even be interesting otherwise.
    (In other words: --date-order is fine for
answered 2011-11-18T20:43:27.747

Your Answer