git config --global safe.directory '*'
git log dev/2.6 ^dev/2.5 ^dev/2.4
Commit Exclusions
^ (caret) Notation
To exclude commits reachable from a commit, a prefix ^ notation is used. E.g. ^r1 r2 means commits reachable from r2 but exclude the ones reachable from r1 (i.e. r1 and its ancestors).