I was wondering if its possible to execute commands from history that match a certain regex? I know you can do something like
fc 232 248
And it will go into your
history and then do revisions 232-248 consecutively.
However, if some of the commands in between are things I do not want to do, is there a way I can specify that? Right now I look up my
history and pipe it out to a
history | grep checkout
So this will look up all terminal actions I've done with checkout I have done.
232 git checkout master files/file1.txt 234 git checkout master files/file2.txt 248 git checkout master files/file3.txt
It filters out some of the numbers so I only want to execute the ones that have been piped out. rather than everything in between