I want to konw the diff comparing to the last commit in a Github Actions workflow.
With Checkout@v1, I can obtain the whole repo, therefore I can call “git diff HEAD^” to check the diff. However, it downloads the whole repo, which takes much longer time when dealing with a repo with a long history.
With Checkout@v2, it only downloads the current commit, and “.git” directory is not downloaded, therefore “git diff HEAD^” can not execute.
I wonder if there is an easy way to checkout the diff.