Skip to content
Discussion options

You must be logged in to vote

When use Checkout@v2, only a single commit is fetched by default, for the ref/SHA that triggered the workflow. Set fetch-depth to fetch more history. In your case, you could set fetch-depth=2. Then you could run 

git diff HEAD^ HEAD to get the diff comparing to the last commit. 

Please see my example:

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Product Feedback Share your thoughts and suggestions on GitHub features and improvements
2 participants