Scenario: I\'m trying to get my unix dot-files under git. I have to work between (at least) the cygwin environment and some standard linux distros (ubuntu a
Good question. Even though you said:
...Since I don't want to checkout useless files...
I would go for putting the platform-specific or variant-specific items in the same branch as the main code, but in a separate directory for that platform/variant. The key is to isolate the platform-specific stuff to as small an area as possible (i.e. avoid the ifdefs in the main code).
E.g.:
/
+--common
+--linux
+--cygwin
+--windows
+--mac
Various cross-platform projects organise themselves in this way. E.g. check out Python's source code structure for supporting multiple platforms.
It simplifies your workflow in this regard, so you are more free to use branches for other more interesting purposes.