From e677189742c3b2516d5ad74cd8a0e05425d9e44a Mon Sep 17 00:00:00 2001 From: keyboardan Date: Tue, 28 Jul 2026 19:36:24 +0000 Subject: [PATCH] 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 --- wiki/source/wiki.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/wiki/source/wiki.md b/wiki/source/wiki.md index 1b6ef35..9d8b9d9 100644 --- a/wiki/source/wiki.md +++ b/wiki/source/wiki.md @@ -4,6 +4,7 @@ author: - benharri - audiodude - xwindows + - keyboardan 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 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: + + + +```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 Ask on irc if you have questions!