Background: I've inherited some MATLAB code to analyze data for my Ph.D. research. To help me better understand the code, I've pared the code down to the minimum subset of files required to run the code for a sample test case.
Question: I would like to commit this code to a version control system as two branches, a master
branch containing all of the code, and a minimal
branch containing my pared-down version of the code, and be able to merge changes back and forth between these branches. How can I accomplish this?
I would prefer to do this with a single working directory and named branches in either Git or Mercurial, but I am open to other suggestions.
Edit: I thought I'd seen a previous Stack Overflow question along these lines, and I just found it: Pushing updates to a pruned Mercurial branch. In a comment to the accepted answer, it's mentioned that the term for what I'm trying to do is "narrow cloning" and that it's a work in progress for both Git and Mercurial.