pastebin - collaborative debugging tool
rovema.kpaste.net RSS


git only add non-whitespace changes
Posted by Anonymous on Tue 17th Oct 2023 01:09
raw | new post
view followups (newest first): git only add non-whitespace changes by Anonymous

  1. #
  2. # git only add non-whitespace changes
  3. #
  4. # Needed in case of a source file with mixed CR/CR-LF endings
  5. git diff >../backup.diff
  6. git diff -w | git apply --cached --ignore-whitespace

Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Syntax highlighting:

To highlight particular lines, prefix each line with {%HIGHLIGHT}




All content is user-submitted.
The administrators of this site (kpaste.net) are not responsible for their content.
Abuse reports should be emailed to us at