I'm working on a new project that I plan to keep in a git repository. I know how I would do this in CVS, but I'm a bit new to git and could use some suggestions.
The project is firmware for two embedded devices that talk to each other and are packaged as a pair. For both devices there is a production variant and a manufacturing variant of the code. Both device projects have a number of sub/sibling projects for exercising various bits of the hardware (blink the LEDs, etc), or hardware related bits of code (drivers, etc). Most of the code is common across everything.
I also have a requirement to be able to rev the production and manufacturing firmware independently of each other to prevent a change to one from sending the other back through verification.
Below is my existing directory layout. It grew organically and was largely laid down before I knew I would be using git. I'm not averse to reorganizing the whole thing if there's a better way to do it.
- ProjectRoot
- include
- src
- DeviceA
- production
- manufacturing
- blink
- buttons
- ...
- DeviceB
- production
- manufacturing
- blink
- buttons
- ...
I'm tempted to put production and manufacturing on branches, but I typically work on both in a given day and git only allows one branch to be active at a time. And then I wouldn't know what to do with blink, buttons, etc because they're not really manufacturing or production. Suggestions?
Clarifications:
The manufacturing version of the code is used on the manufacturing line to test the hardware. The production code is loaded after the hardware passes the test station and is what's shipped to the customer. The two are at least 75% similar, but they need to be independent so I can fix a bug in the production code without having to stop the manufacturing line.
Because DeviceA and DeviceB are a pair, both code sets are tagged and released at the same time with the same release version number.