Skip to content

Instantly share code, notes, and snippets.

@573
Last active February 7, 2024 13:27
Show Gist options
  • Save 573/4b0e5bea4ad5924e128b3a83aa3634b9 to your computer and use it in GitHub Desktop.
Save 573/4b0e5bea4ad5924e128b3a83aa3634b9 to your computer and use it in GitHub Desktop.
git github tip: diff of local revision towards a remote revision on github

I. e. when last successful running gha was (https://github.com/573/nix-config-1/actions/runs/7762460516, commit is https://github.com/573/nix-config-1/commit/0bd694c0a76fdc0561fd637700619dccd6b6570e) and I wanna know the difference to my current failing one.

So I first fetch this exact commit 0bd694c0a76fdc0561fd637700619dccd6b6570e to a debug branch while then I can inspect the differences to my local branch's (wsl2) head:

git fetch https://github.com/573/nix-config-1.git 0bd694c0a76fdc0561fd637700619dccd6b6570e:refs/heads/debug --depth 1
git diff 0bd694c0a76fdc0561fd637700619dccd6b6570e..wsl2
git diff 0bd694c0a76fdc0561fd637700619dccd6b6570e..wsl2 -- . ":(exclude)flake.lock"
# change something accordingly
nix eval --show-trace --raw  .#nixosConfigurations.DANIELKNB1.config.system.build.toplevel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment