I have an asm/C code which implements some image filters. The objective of this project is experimentation with different implementations, benchmarking, plotting and reporting data to write a paper with relevant insights.So for example one work-flow I need would be:Start at a base code implementation (Step 0)Compile, benchmark, plotChange parameter X from 110 to 100 in main.c (Step 1)Compile, benchmark, plotChange parameter Y from 10 to 15 in main.c (Step 2)Compile, benchmark, plotBut I need to be able to access every step of the way with a git tag/branch/commit/something. So that I might re-run the test on a different PC or make changes to each step. For example I might decide that changing X from 110 to 100 was not enough, so I change step 1 to be change X from 110 to 80 for step 1.I thought about using 1 branch for each experiment with a tag for each step, for example with the tags being step0-2 and the branch being experiment1:git checkout experiment1 #step0compile, benchmark, plotgit checkout -b test step1compile, benchmark, plotgit checkout -b test step2 #overwriting test?compile, benchmark, plotgit branch -d testBut with this solution I can't easily change step 1, I'd need to start from the base and do it all over again, creating a new experiment branch (because I shouldn't commit between commits right?).I also heard git branches should not be used for things not meant to be merged back. Am I over-complicating things? Is there a more obvious/simple way of managing this? Is the answer not git and I should use some other system?
How to manage code experiments meant to stay permanently with git?
git;computer science;benchmarking
You shouldn't use git to handle this complexity.  It would be a nightmare, the branches would diverge to far apart with time.  You would be left with snippets of code that would all need to be separately managed.A much more flexible solution would be to make the varying parts of your code base flexible.  For instance, if you need the ability to change input parameters, make the parameters configurable on the command-line.  This requires one binary, but you can run multiple tests.If you need to implement separate algorithms/functions, you can make them configurable as well.  Function pointers in C are a great way to do this, and this can be configurable from the command line also.