Git - adhuliya/ws-misc GitHub Wiki

Remove a file from the staging area

git rm --cached <file>

Diff of file contents

# diff w.r.t. the HEAD (prefers staging area if file present there)
git diff <file>;

git diff <commit>:file1 <commit>:file2;

# diff w.r.t. the commit before head
git diff HEAD:file1 HEAD^:file2;

# defaults to current file on disc
git diff HEAD:file1  file2;
⚠️ **GitHub.com Fallback** ⚠️