From 3aa6c366ffafb48741534d1e725fc300c84882bd Mon Sep 17 00:00:00 2001 From: Malin Freeborn Date: Sun, 8 Mar 2020 13:07:40 +0100 Subject: [PATCH] expand subtree in git --- data/git.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/data/git.md b/data/git.md index c44a5ef..21c9e82 100644 --- a/data/git.md +++ b/data/git.md @@ -81,6 +81,12 @@ and delete featurez as you've already merged it: # Subtree +## Pulling another git repo into a subtree + +> git subtree add -P config git@gitlab.com:bindrpg/config.git master + +## Pulling a Subtree from an existing git + The project has subdirectories sub-1,sub-2,sub-3. The first should be its own repository, but should also retain its own history. First, we extract its history as an independent item, and make that into a seprate branch.