Skip to content

Instantly share code, notes, and snippets.

@willnode
Last active February 28, 2018 07:44
Show Gist options
  • Save willnode/ccfcfe3b7858847e287c735b4bee0e28 to your computer and use it in GitHub Desktop.
Save willnode/ccfcfe3b7858847e287c735b4bee0e28 to your computer and use it in GitHub Desktop.
Repo Cleanup (trailing spaces and EOF blank line) using Notepad++

How to clean your Repo

Cleaning repo is easy as 1.2.3

Remove trailing spaces

Find: [ ]+$

Replace: (empty)

Regex: Yes

. matches newline: No

Add blank line to end of file

Find: (.+)

Replace: $1\r\n

Regex: Yes

. matches newline: Yes

Trim multiple lines at end of file

Find: [\s]+$

Replace: \r\n

Regex: Yes

. matches newline: Yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment