Forked from neilgoldman/git-add-ignore-space-at-eol.sh
Created
March 1, 2024 21:01
-
-
Save mokolabs/54473f7b46cf67e73c953c6986ed407f to your computer and use it in GitHub Desktop.
Revisions
-
mokolabs revised this gist
Mar 1, 2024 . 2 changed files with 1 addition and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +0,0 @@ This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ git diff -w --no-color | git apply --cached --ignore-whitespace -
Neil Goldman created this gist
Aug 2, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,4 @@ git diff --ignore-space-at-eol --no-color | git apply --cached --ignore-whitespace # substitute `--ignore-space-at-eol` with `-w` to ignore all modified whitespace (don't do this when committing Python of course) # optionally, run `git checkout .` afterwards to remove EOL-only changes