I just got a directive to revert a bunch of committed code. The good news is that all commit's have a reference string in them, something like:
ABC-1556
ABC-1616
ABC-4818
ABC-5919
This commend will give me one of them, how do I modify the grep commend to find them all?
git log --pretty=oneline --abbrev-commit --grep='ABC-1556'
You could put all your reference strings into a file (say,
patterns), and then usexargsto run thegit logcommand for each string:If it's just a small number of patterns you could combine them on the command line like this: