I have a C project source (Linux kernel in this case), and Makefile.
I find this painful because I do modifications and I switch betwen branches and then I forget which commit these object files relate to.
Can I do version control automatically over the building process?
For example (just I think might be a good workflow, maybe it's silly):
Force me make sure the git working spcace is clean before
make
Keep version of build automatically. Relate one build to both an object file and a source file.
I can checkout any build
I can know which
.o
files are up-to-date (compared with source code working space). Likegit status
But most of all, the source code git tree can't be interfered.