0

I'd like to split out a subfolder in one git repo to make a new one (and preserve git history). GitHub has some good documentation on how to do this using git filter-repo. However, the issue is that some additional changes need to be made after the split to get the new repo ready to run in a new production environment. Ideally, these are the steps I'd like to take:

  1. Follow the documentation above to split out the subdirectory to a new repo.
  2. In a new branch on the new repo, make and test minor changes necessary to deploy this repo separately.
  3. Periodically "pull in" all recent changes from the old repo to the new repo.
  4. Once everything is tested and ready, merge the new branch into master and deploy the new repo to production.

Is there a way to accomplish step #3 using git filter-repo or another approach (maybe cherry-picking commits from a remote or similar)?

jrdioko
  • 30,362
  • 26
  • 82
  • 118
  • `git subtree split`, `git subtree push`. Read the [`git help subtree`](https://github.com/git/git/blob/master/contrib/subtree/git-subtree.txt). – phd Dec 20 '21 at 22:18

0 Answers0