I have a Git repository with multiple branches. I’m looking to take certain folders from one of the branches and create a new repository with just those folders. What’s the best way to do this while keeping my history for those folders intact?
I have a Git repository with multiple branches. I’m looking to take certain folders
Share
For certain definition of ‘intact’, you can create a history of commits which only contains a given folder by using
git filter-branchwith the--subdirectory-filteroption.See this previous SO question: Detach (move) subdirectory into separate Git repository