I have a development setup like this:
/themes/themename/css/style.css # path to drupal theme css file
/styleguide/source/css/style.css # path to generated css-file in styleguide
The styleguide has example markup for all different page types, and this is where design implementation is done. The drupal theme css file is tracked in git, and is updated in master from the css generated in the stylebuide. However, I constantly need to check that the style development also displays correctly in the drupal site, while I implement the design. I therefore have setup a softlink so that:
/themes/themename/css/style.css -> /styleguide/source/css/style.css
This works nicely, I can just reload the web browser with the drupal view, and the newly generated css-file is loaded.
Currently I hide the fact that style.css is changed (for git), using:
git update-index --assume-unchanged /themes/themename/css/style.css
However, whenever I do a git pull, or git checkout on an existing branch, git will complain, saying:
error: Your local changes to the following files would be overwritten by checkout:
themes/uib_w3/css/style.css
Please, commit your changes or stash them before you can switch branches.
Aborting
Any suggestions how I could avoid getting this message? Perhaps using some hook to reset the file on git pull, and the reestablish the link post pull? Or is there another approach to this that might work better?