@matheusbsbs / matheus-bagliano / commits / 37668a13ed
Fork 0

git-subtree.txt: add another example.

Win Treese committed Feb 5, 2010 at 19:48 UTC 37668a13edbc8bd8f8ac5ecbd5bf839a4171c09b
1 file changed +19 -2
git-subtree.txt
+19 -2
@@ -223,8 +223,8 @@ OPTIONS FOR split
223 subproject's history to be part of your project anyway.
224
225
226 -EXAMPLES
227 ---------
226 +EXAMPLE 1
227 +---------
228 Let's use the repository for the git source code as an example.
229 First, get your own copy of the git.git repository:
230
@@ -284,6 +284,23 @@ the standard gitweb:
284
285 git log gitweb-latest..$(git subtree split --prefix=gitweb)
286
287 +EXAMPLE 2
288 +---------
289 +Suppose you have a source directory with many files and
290 +subdirectories, and you want to extract the lib directory to its own
291 +git project. Here's a short way to do it:
292 +
293 +First, make the new repository wherever you want:
294 + <go to the new location>
295 + git init --bare
296 +
297 +Back in your original directory:
298 + git subtree split --prefix=lib --annotate="(split)" -b split
299 +
300 +Then push the new branch onto the new empty repository:
301 + git push <new-repo> split:master
302 +
303 +
304
305 AUTHOR
306 ------