While in a shallow clone of a single commit, is it possible to diff the current checkout to a remote?
Shallow checkout:
$ git init
$ git remote add origin <some_git_url>
$ git fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin --depth=1 +<commit_hash>:refs/remotes/origin/<commit_hash>
$ git checkout --progress --force refs/remotes/origin/<commit_hash>
show changes doesn't work:
$ git diff remotes/origin/main
I understand why the above doesn't work, are there any ways to diff against the remote, though?