Maintaining development branches, where one branch is a subset of the other branch

Background . I inherited some MATLAB code for data analysis for my Ph.D. study. To help me better understand the code, I compared the code with the smallest subset of files needed to run the code for the test case.

Question . I would like to commit this code in the version control system as two branches: a branch mastercontaining all the code, and a branch minimalcontaining my shortened versions of the code and be able to merge the changes between these branches. How can i do this?

I would prefer to do this using one working directory and name the branches in Git or Mercurial, but I am open to other suggestions.

Change . I thought I saw the previous question about stack overflow in these lines, and I just found it: Pushing updates to the trimmed Mercurial branch . In the commentary to the accepted answer, this is what the term for me trying to do is "narrow cloning", and that this is a work in progress for both Git and Mercurial.

+3
source share
1 answer

Both git and mercury should work fine. Create the main branch, then copy it to the minimum branch, then split the minimum branch so that it looks like your implementation (delete all additional files, copy the files that you changed).

. , . , ( ), / .

+4

Source: https://habr.com/ru/post/1716251/


All Articles