add everything but whitespace changes

This commit is contained in:
Hemanth.HM 2016-10-24 21:40:06 +05:30
parent a7cb20ee0f
commit 318484a77f
2 changed files with 10 additions and 1 deletions

View File

@ -145,6 +145,7 @@ P.S: All these commands are tested on `git version 2.7.4 (Apple Git-66)`.
* [Specific fetch reference](#specific-fetch-reference)
* [Find common ancestor of two branches](#find-common-ancestor-of-two-branches)
* [List unpushed git commits](#list-unpushed-git-commits)
* [Add everything, but whitespace changes](#add-everything-but-whitespace-changes)
<!-- Dont remove or change the comment below that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
<!-- @doxie.inject end toc -->
@ -996,5 +997,10 @@ git log @{u}..
git cherry -v
```
## Add everything, but whitespace changes
```sh
git diff --ignore-all-space | git apply --cached
```
<!-- Dont remove or change the comment below that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
<!-- @doxie.inject end -->

View File

@ -425,4 +425,7 @@
"title": "List unpushed git commits",
"tip": "git log --branches --not --remotes",
"alternatives": ["git log @{u}..", "git cherry -v"]
}]
}, {
"title": "Add everything, but whitespace changes",
"tip": "git diff --ignore-all-space | git apply --cached"
}]