git log --not $(git log --format="%H" -S'Change-Id <anti regex>')
If you have other arguments, you should duplicate them, one inside --not and one outside, otherwise it can be very slow. Alternatively, use a variable.
( git rev-list may have been a leading option inside --not , but it does not have the -S option.
source share