Display gitk log in reverse order
Is there any way to reverse the order of the visual commit log view that displays in gitk?
I’m talking about visual representation that renders in gitk in color as a tree view; i.e., the GUI version of what you get when you run something like this in the terminal:
- gitk: weird history tree
- How do I “unmark” a commit in gitk?
- Gitg behavouir as gitk --all
- How to customise UnGit branch graph?
- How to view complete commits when tracking history of a single file in Git?
- Error: fatal loose object ### (stored in .git/objects/… is corrupt)
git log --graph --online --abbrev-commit
I’ve looked in the menu under Edit Preferences and View New view..., but I couldn’t find anything that pertained to the ordering of the commits.
I know I can display the commit log in reverse order in the terminal by adding the
git log --reverse --oneline --abbrev-commit # Displays list correctly
But it doesn’t seem to play nicely with the
git log --reverse --oneline --abbrev-commit --graph # fatal: cannot combine --reverse with --graph
Perhaps this is why gitk doesn’t give us the option to render the view in reverse.
At any rate, I’d like to know: is possible in gitk to reverse the order of the commit log view?
One Solution collect form web for “Display gitk log in reverse order”
gitk mostly accepts the same arguments as
git rev-list (git: Is there a command line option for "Sort by date" for gitk?). However the
--reverse argument, which would show the commits in descending order, is specifically excluded:
"--objects" - "--objects-edge" - "--reverse" # These cause our parsing of git log's output to fail, or else # they're options we want to set ourselves, so ignore them.
(Added in ee66e089c.)
Commenting it out and running with
gitk --reverse seems to work, but I’m not sure if that would be accepted upstream as a patch.