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.
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=*
--all
, --branches=*
and --remotes=*
do, and whether the --all
is redundant or not? I had a look at git-scm.com/docs/git-log but it's a little hard to read, and didn't give in the "EXAMPLES" section how to do a listing of commits that includes all commits from local and remotes, or even a single example of using --all
. –
Delirious git reset HEAD~1
or something like that, where the commit is only in the reflog, and not actually on a branch anymore. –
Phytogenesis --all
implies --branches=*
and --remotes=*
–
Rivulet 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
© 2022 - 2024 — McMap. All rights reserved.