I want to use gitk to view all commits except those by a given author. Something like the following:
gitk --author=!joe
Is this possible?
Use git log --all <filename> to view the commits influencing <filename> in all branches.
The most basic and powerful tool to do this is the git log command. By default, with no arguments, git log lists the commits made in that repository in reverse chronological order; that is, the most recent commits show up first.
on left hand side of the repository page you will notice an option commits. if you click on it it will display all commits on that branch.
Gitk is a graphical repository browser. It was the first of its kind. It can be thought of as a GUI wrapper for git log . It is useful for exploring and visualizing the history of a repository. It's written in tcl/tk which makes it portable across operating systems.
From the command line:
gitk --perl-regexp --author='^(?!joe)'
To exclude commits by several authors:
gitk --perl-regexp --author='^(?!jack|jill)'
Explanation: (?!whatever)
is a (perl-style) look-ahead regular expression: it matches a position not followed by whatever
. We anchor it to the beginning of the Author field by the "beginning of string" regexp ^
.
Or run gitk --perl-regexp
and then in the gitk menu, select View -> New View (or Shift+F4 for short) and write ^(?!joe)
into the "Author" field.
If you do not want to always have to type gitk --perl-regexp
, you can set up git to globally use perl regular expressions by running
git config --global grep.patternType perl
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With