I need to search a long list of git hash ids for a short id which added a file.
For the purpose I checked what was the hash of an old commit which added a file script.js, which I successfully do like:
git log --diff-filter=A -- script.js
, but it spits out the long hash and I want the short instead. I found out that to get the short hash, I can do as follows: git rev-parse --short long
, then I finally have the short.
Then I do git rebase -I --root
to find my short id, but the list is circa 200 lines long. What is a good way to search for my id through this output?