I can't get git log --branches to do what I want. I want to output, in a single graph, commits matching these glob patterns:
users/userA/*fix/*masterI tried these approaches which don't work (they display commits from the current branch):
git log --branches="users/bertgp/* /users/sessid/* master" git log --branches="users/bertgp/*|/users/sessid/*|master" (regex-like syntax)Is this possible? It seems that glob patterns don't have an or syntax.
I am using Git Extensions as my visual git client and its branch filter box appends its content to a (single) --branches= option for its git log command.
I opened a Git Extensions feature request to support this.
You can repeat the --branches option multiple times:
git log --branches="users/bertgp/*" --branches="/users/sessid/*"
In bash, it can be compressed, taking advantage of brace expansion, to
git log --branches={"users/bertgp/*","/users/sessid/*"}
However, most probably, neither of these answers to your original question will work with Git Extensions.
This is possible in Git Extensions 2.49 (not check earlier versions). Though it is cumbersome...
Actually text from branch filter inserted into git command line as-is (or prefixed by --branches=) without escaping or somethig similar. Which means that you can add arbitrary git options.
Here is next things you should know:
--branches=--branches for every branch--remotes/* to end of branch, so you can't use --branches=master, instead you should use --branches=maste[r] with fake globingSome examples:
users/berniegp/* --branches=maste[r]Should do what you asking for. It will be converted by GitExt to --branches=users/berniegp/* --branches=maste[r]
users/berniegp/* --branches=maste[r] --remotes=origin/users/berniegp/*Also show remote tracking branches (origin/users/berniegp/*)
--reflogShow also commits which references from reflog. May be useful for find 'lost' commits?
--bisectShould (I don't try it actually) show range of commits where problem was introduced (between good and bad)
--reverseShow commits in reverse order.
And other options of git log (https://git-scm.com/docs/git-log)
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