How do I diff my working file version vs. some previous version in the remote repository?
Say, I pull today, perform 6 – 8 commits to my local copy and then want to see the diff between my latest working version ( of a given file ) and the latest on the remote or any other version.
If you’re talking about a remote branch, say,
origin/master, you can use~and^to refer to ancestor commits relative to a branch the same way you can with local branches:If you want to diff your current working directory against the 5th most recent commit on
origin/master, you would omit the first argument: