Does git rev-parse HEAD~2 work in github actions? we can do git rev-parse HEAD but not the other one. It shows following error even though i have lots of previous commits. Although it runs from the command line/powershell. I have also included my workflow:
Run git rev-parse HEAD~2
git rev-parse HEAD~2
fatal: ambiguous argument ‘HEAD~2’: unknown revision or path not in the working tree.
Use ‘–’ to separate paths from revisions, like this:
‘git […] – […]’
Error: Process completed with exit code 1.
name: Build Windows
on: [ push ]
runs-on: [ self-hosted, Windows ]
- name: Build test
run: git rev-parse HEAD~2