-
Notifications
You must be signed in to change notification settings - Fork 0
Split a Git Project
neurite edited this page Apr 25, 2017
·
3 revisions
How to split a Git project and keep its history.
Suppose we have an existing project, project A. We want to split it into 2 projects, B and C.
- Create an empty Git repo for project B with no history in it.
- In the existing project, project A, add a remote which points to the empty repo of project B.
- Push the existing project to the new remote. Now project B has a copy of project A including its history.
- In project B, remove the parts that are not B.
- Repeat steps 1 - 4 for project C.
Merge project
git pull <another-project> <branch> --allow-unrelated-histories