Git

Extracting Multiple Subtrees from a Git Repository

Submitted by h2b on
System

Git

Version
2.1.4
Symptom

Multiple subtrees of a Git repository shall be extracted and transferred to a new archive while keeping the version history.

Git provides different approaches to solve this task. Here, we use the git-subtree command to create branches from the subtrees to be detached. Then, these branches will be imported from another repository. Sources were the manpage (man git-subtree) and this answer on stackoverflow along with some comments listed there.