diff --git a/README.md b/README.md index 4876efc..d34ee90 100644 --- a/README.md +++ b/README.md @@ -98,6 +98,7 @@ * [View the GPG signatures in the commit log](https://github.com/git-tips/tips#view-the-gpg-signatures-in-the-commit-log) * [Remove entry in the global config.](https://github.com/git-tips/tips#remove-entry-in-the-global-config) * [Checkout a new branch without any history](https://github.com/git-tips/tips#checkout-a-new-branch-without-any-history) +* [File diff between staging and the last file version.](https://github.com/git-tips/tips#file-diff-between-staging-and-the-last-file-version) @@ -671,5 +672,10 @@ git config --global --unset git checkout --orphan ``` +## File diff between staging and the last file version. +```sh +git diff --staged +``` + diff --git a/tips.json b/tips.json index f0959cf..c34b4f1 100644 --- a/tips.json +++ b/tips.json @@ -299,4 +299,7 @@ },{ "title": "Checkout a new branch without any history", "tip": "git checkout --orphan " +},{ + "title": "File diff between staging and the last file version.", + "tip": "git diff --staged" }]