It is good etiquette to remove whitespaces from files before

committing changes.  Adding a section in wiki.md teaching how to do
this.

Signed-off-by: keyboardan <keyboardan@tilde.club>
This commit is contained in:
keyboardan
2026-07-28 19:36:24 +00:00
committed by deepend
parent 88e1e38d1f
commit e677189742

View File

@@ -4,6 +4,7 @@ author:
- benharri - benharri
- audiodude - audiodude
- xwindows - xwindows
- keyboardan
category: tilde.club category: tilde.club
--- ---
@@ -79,6 +80,26 @@ You can do this right from the Github GUI!
it. if you're working locally on Tilde.club, you won't have to configure it. if you're working locally on Tilde.club, you won't have to configure
anything; git will use the system's sendmail to handle the email. anything; git will use the system's sendmail to handle the email.
# Removing unnecessary spaces in git patches is important
Removing unnecessary whitespace in git patches is a common civilized thing to do when contributing. This makes it easier for people reading or modifying the same file, making it clear what changes are being made, by the patch.
Before committing a file, do run:
<!-- This code excerpt need improvement (with process substitution?). Do test your snippet before putting here. -->
```bash
tmpfile=$(mktemp)
editedfile="path/to/file-to-commit"
git stripspace < "$editedfile" > $tmpfile
mv $tmpfile "$editedfile"
unset tmpfile editedfile
```
and you are alright. Do remember doing this.
# Most importantly # Most importantly
Ask on irc if you have questions! Ask on irc if you have questions!