Skip to content

Commit 1683037

Browse files
committed
staged diff
1 parent 157337d commit 1683037

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@
9898
* [View the GPG signatures in the commit log](https://github.com/git-tips/tips#view-the-gpg-signatures-in-the-commit-log)
9999
* [Remove entry in the global config.](https://github.com/git-tips/tips#remove-entry-in-the-global-config)
100100
* [Checkout a new branch without any history](https://github.com/git-tips/tips#checkout-a-new-branch-without-any-history)
101+
* [File diff between staging and the last file version.](https://github.com/git-tips/tips#file-diff-between-staging-and-the-last-file-version)
101102

102103
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
103104
<!-- @doxie.inject end toc -->
@@ -671,5 +672,10 @@ git config --global --unset <entry-name>
671672
git checkout --orphan <branch_name>
672673
```
673674

675+
## File diff between staging and the last file version.
676+
```sh
677+
git diff --staged
678+
```
679+
674680
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
675681
<!-- @doxie.inject end -->

tips.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,4 +299,7 @@
299299
},{
300300
"title": "Checkout a new branch without any history",
301301
"tip": "git checkout --orphan <branch_name>"
302+
},{
303+
"title": "File diff between staging and the last file version.",
304+
"tip": "git diff --staged"
302305
}]

0 commit comments

Comments
 (0)