-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Diff between PR and master #160
Copy link
Copy link
Closed
Description
Hi,
I am trying to obtain a diff between the current HEAD of a PR and the master branch.
I understand that checkout only fetches the latest revision of the current branch only, so
I tried the approach to fetch all branches from the README.
- uses: actions/checkout@v2
- run: |
git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/*
- run: git diff master HEAD
This fails with
Run git diff master HEAD
fatal: ambiguous argument 'master': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
##[error]Process completed with exit code 128.
Running git diff master HEAD on a local copy of the repository works fine:
git clone <repo>
git checkout pr-branch
git diff master HEAD
What am I doing wrong?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels