I would like to be able to see which files have changed between my current branch and the master branch during a jenkins build.
in my jenkinsfile i have the below code.
git diff-tree -r --no-commit-id --name-only ${env.GIT_COMMIT} origin/master
but i get the below error
fatal: ambiguous argument 'master': unknown revision or path not in the working tree.
Any help would be appreciated..it'd be great if someone could tell me what i'm doing wrong or devise an alternate solution that will give me the filepaths of files that have changed.
fyi, the above command works locally, but not in jenkins.