I am trying the following
git log --before {2.days.ago} --after {14.days.ago} --all --stat
But it seems to only give me the log for one remote branch. I'd like to get the log for branches remote and local.
git log --before {2.days.ago} --after {14.days.ago} --all --stat --branches=* --remotes=*
Can you explain what --all, --branches=* and --remotes=* do, and whether the --all is redundant or not?
--all
, as mentioned in git rev-list
or git rev-parse
, --all include --branches
or --remotes
:
--all
Show all refs found in refs/.
--branches[=pattern]
--tags[=pattern]
--remotes[=pattern]
Show all branches, tags, or remote-tracking branches, respectively (i.e., refs found in
refs/heads
,refs/tags
, orrefs/remotes
, respectively).If a pattern is given, only refs matching the given shell glob are shown.
If the pattern does not contain a globbing character (?
,*
, or[
), it is turned into a prefix match by appending/*
.
See as an illustration t/t6018-rev-list-glob.sh
#L136-L138:
test_expect_success 'rev-parse --exclude with --all' '
compare rev-parse "--exclude=refs/remotes/* --all" "--branches --tags"
'
Since remote branches are requested, this should be enough:
git log --before {2.days.ago} --after {14.days.ago} --stat --branches --remotes
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