== 2025-07-29 == I was wondering how to manage DWM updates after applying patches to the base source code.... There's a description at [0] The idea seems to be to clone the original DWM source from git : git clone git://git.suckess.org/dwm then cd into dwm make a new personal branch: git branch g4slv checkout this branch to start working on it git checkout g4slv then apply patches, modify config.def.h etc... to this separate branch, commit after each patch, some of them need manual intervention by inspecting the "reject" hunks and editing the source. git apply --reject ~/path/to/patch.diff fix any errors... test it works by making and running the new version (edit .xinitrc to point to this dwm executable and startx) If the patch has worked then make clean (removes object files and executable) rm config.h (config.def.h holds the real config) git add . git commit -v add commit comment & save On to the next patch/config change.... Once done make and install the final version. make clean rm config.h git add . git commit.... This repo is now your own personal version as one branch and the master from suckless.org as the "master" branch. When an upstream change/release is done you update the master branch: git checkout master git pull Then "rebase" your own branch on top of the new master git checkout g4slv git rebase --preserve-merges master This is where the fun might start - resolving any conflicts.... The instructions at suckless.org say: In case there are merge conflicts anyway, resolve them (possibly with the help of git mergetool), then record them as resolved and let the rebase continue git add resolved_file.ext git rebase --continue If you want to give up, you can always abort the rebase git rebase --abort I'll cross that bridge when I come to it. [0]https://dwm.suckless.org/customisation/patches_in_git/ === I also want to keep "my" branch on Github === Steps to keep my local branch updated on Github while still being able to pull updates from "master" branch (suckless.org) git remote add g4slv git@github.com:gm4slv/dwm.git git config remote.pushDefault g4slv To work on "my branch" : checkout g4slv do work.... clean up etc.... git add . git commit -m "......" git push