summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e2d0a45)
raw | patch | inline | side by side (parent: e2d0a45)
author | Win Treese <treese@acm.org> | |
Sat, 6 Feb 2010 00:48:11 +0000 (19:48 -0500) | ||
committer | Avery Pennarun <apenwarr@gmail.com> | |
Sat, 6 Feb 2010 02:02:52 +0000 (21:02 -0500) |
git-subtree.txt | patch | blob | history |
diff --git a/git-subtree.txt b/git-subtree.txt
index 9b2d48e334b2df98b6509ed778fe3d9a2764b177..2200aaeaf2868d7a413d2f96b86e929267533d2e 100644 (file)
--- a/git-subtree.txt
+++ b/git-subtree.txt
subproject's history to be part of your project anyway.
-EXAMPLES
---------
+EXAMPLE 1
+---------
Let's use the repository for the git source code as an example.
First, get your own copy of the git.git repository:
git log gitweb-latest..$(git subtree split --prefix=gitweb)
+EXAMPLE 2
+---------
+Suppose you have a source directory with many files and
+subdirectories, and you want to extract the lib directory to its own
+git project. Here's a short way to do it:
+
+First, make the new repository wherever you want:
+ <go to the new location>
+ git init --bare
+
+Back in your original directory:
+ git subtree split --prefix=lib --annotate="(split)" -b split
+
+Then push the new branch onto the new empty repository:
+ git push <new-repo> split:master
+
+
AUTHOR
------