Me and my colleague are developing code for embedded system and we keep it in git repository.
Aside from main Application project, we also needed to develop a Bootloader for the same device to be able to reprogram the application when necessary.
The main application consists of ~15 modules / C files, not counting the libraries provided by microcontroller vendor.
The Bootloader is made based on the Application project and in practice all the Application modules are removed, except modules for TCP stack, Ethernet configuration and other necessary things like clocks etc.
On top of this stripped-down Application project we added module doing the Bootloader jobs.
My colleague decided to keep this Bootloader in the same repository, but just on different branch.
In my opinion branches should be used only for the same project, as experiment, feature, release, stabilization branches etc.
Although today I cannot see any big technical or workflow issue to keep Bootloader in the same repo on different branch but I just don't find this solution elegant and would prefer to create separate repository for Bootloader.
Can you have multiple projects in one Git repository?
Maybe I am just way too pedantic and should not care that much about this and insist on creating a separate repository?