NOTE: I plan on answering my own question.
This is the last command I ran on the command line:
git co head -- a/path/to/a/file.ts
I want to run this a few more times but with different file paths for the last argument/parameter. This page explains history expansion, and I think the answer I’m looking for is in this subsection, but it lacks examples.
Using history expansion, how would I rerun the previous command with a different file path? For example, how would I run:
git co head -- a/path/to/another/different-file.ts
This is probably a duplicate but I haven’t been able to find the answer I’m looking for. These posts look like they might have the answer but they didn’t: