title: Github Actions: Git diff master...HEAD fatal: no merge base
body: <h2>Some context</h2>
  <p>Long story short: I am trying to run <code>jest --changedSince=master</code> when I open up a new Pull Request. The jest changedSince flag runs <code>git diff master...HEAD</code> in the background. This results in an error which I can't seem to get my head around.</p>
  <h2>Current situation</h2>
  <p>To debug this I have a <code>Github Action</code> which has a step which closely resembles the following:</p>
  <pre class="lang-yaml prettyprint-override"><code>runs-on: ubuntu-latest
      steps:
      - uses: actions/checkout@v2
      - run: |
          git fetch --no-tags --depth=1 origin master
          git checkout -t origin/master
          git checkout pull/1/merge
          git diff master...HEAD
  </code></pre>
  <p>This results in the following error (Which is the same error returned by Jest):</p>
  <pre><code>fatal: refs/remotes/origin/master...HEAD: no merge base
  </code></pre>
  <hr />
  <h2>What I have tried</h2>
  <p>The problem does not occur when I run this locally (imagine that). I do realise that the biggest issue here is most likely the fact that the <code>actions/checkout@2</code> action does not fetch the entire repository. That's why I added the <code>git fetch</code> &amp; <code>git checkout -t origin/master</code> and <code>pull/1/merge</code> command.</p>
  <p>I did attempt to run <code>git branch -a</code> to debug if this worked as expected, these were the results:</p>
  <pre><code>* (HEAD detached at pull/1/merge)
    master
    remotes/origin/master
    remotes/pull/1/merge
  </code></pre>
  <p>All the refs which are required to run <code>git diff master...HEAD</code> seem to be available in the action.</p>
  <p>I have also tried to check if the actual <code>ref</code> is returned correctly:
  I ran <code>git show-ref master</code> inside the action which returns:</p>
  <pre><code>&lt;commit-sha&gt; refs/heads/master
  &lt;commit-sha&gt; refs/remotes/origin/master
  </code></pre>
  <p>I am out of ideas on what could cause this issue, any ideas are appreciated greatly!</p>