I am working on a code and I found my self in a situation similar to one explained on this blog. Basically, I have two versions of the code, that use completely different containers. This is done to compare the efficiency of the code when different containers are used. Because I am relying on the efficient container member functions, I cannot make the code generic with respect to containers, so I chose an approach where I have two git branches: one for optimized code and the other for not optimized code.
The problem is that after I have optimized a part of the code, I need to do some common work on two, now diverging, branches. Is it possible to do the work on an "upstream" (non-optimized) branch and then cherry pick the common commits to the optimized branch without resolving a lot of conflicts?
I have followed the tutorials found online, created a dummy repository with a single file (to test the conflicts) and some branches.
For this git repository example, is it possible to cherry pick say commit "02 second" on the branch "second" into the master branch without resolving conflicts? I have nothing against conflict resolving, but I am interested if it could be avoided.
What is the correct workflow in this situation? Should I apply changes that are common, commit, cherry pick + resolve conflicts, and that's it?