In my workflow I'm usually only interested in my own branches and some specific branches like staging
or master
and would like my git log
to reflect that. I've come up with this command :
git log --branches=staging* --author=my_name
The problem is that the author
and branches
filters seem to linked with the logical operator and
, meaning that I can either see all my branches or staging, but not both at the same time.
In other words, I'd like to see only commits where I'm the author AND all the commits of the branch named staging
branch (regardless of the authors), with one single command.
Is there a way to achieve this ?
Lets you rewrite Git revision history by rewriting the branches mentioned in the <rev-list options>, applying custom filters on each revision. Those filters can modify each tree (e.g. removing a file or running a perl rewrite on all files) or information about each commit.
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.
Line Log Search Simply run git log with the -L option, and it will show you the history of a function or line of code in your codebase.
The git shortlog command is a special version of git log intended for creating release announcements. It groups each commit by author and displays the first line of each commit message.
Git will take commit ids from stdin, it's not limited to any precanned set of construction operators and there's no reason to duplicate arbitrary selection logic when the results can be achieved with existing tools.
(git rev-list --branches=staging*;git rev-list --all --author=my_name) \
| git log --stdin --no-walk --oneline
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