So, dilemma time. Your client sends you a list of changes. Somewhere in that list is the innocuous sounding, ‘style account section’. You leave it till last in the knowledge that the account section is already complete and possibly needs a few tweaks after the new button style you have introduced.
Holy moly, it’s completely untouched. Raw CMS without a hint of the painstaking markup you spent days putting together.
This is one of the dangers of working with multiple branches in git. I often work with a different branch for each section of the site, happy in the knowledge that they should have few conflicts when I merge them back into the main branch. But today i found out that I had forgotten to merge in a whole feature set, and as it wasn’t until I had already copied over the files from the cms default theme, that I realised, yes, yes I have done this already.
Like many things, when you take a few moments to consider them, and spend few more researching your options, there is usually an elegant way to proceed. In this case I thought I was in for painful and tedious rebase operation. Turns out that from my main working branch, I can actually merge in a directory from another branch using a less well know application of the git checkout command
:(main-branch)$ git checkout lost-branch path/to/lost/folder