I have the following simple Bitbucket (cloud) pipeline, where in this case the
BITBUCKET_PR_DESTINATION_BRANCH = master
image: java:8
pipelines:
pull-requests:
'feature/*':
- step:
script:
- git fetch "+refs/heads/*:refs/remotes/origin/*"
- git diff $BITBUCKET_PR_DESTINATION_BRANCH ./gradle.properties > diff.txt
When it executes, I get
+ git diff $BITBUCKET_PR_DESTINATION_BRANCH <a href="https://bitbucket.org/ziftsolutions/marcom-stats-svc/src/9f0a2d72f183a05de94f3880aec39f1cb685a1a4/gradle.properties" target="_blank" rel="noopener noreferrer">./gradle.properties</a> > diff.txt<br>fatal: ambiguous argument 'master': unknown revision or path not in the working tree
Why so?