As W4rl0ck said, don't use branches, use functions and modules. I have multiple variations of code all inside one branch and call the relevant modules based on the size of the controller in the room. Now cleaning up your code and removing any hardcoded assumptions you've made is an entirely different thing