Skip to content

Commit

Permalink
docs: simplify example 1
Browse files Browse the repository at this point in the history
The documentation was written prior to Wayne Walter's 2-parameter add.
Using 2-parameter add in example 1 makes the example much simpler.
  • Loading branch information
bryanlarsen authored and apenwarr committed Jul 21, 2010
1 parent df2302d commit 242b20d
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions git-subtree.txt
Original file line number Diff line number Diff line change
Expand Up @@ -236,18 +236,14 @@ EXAMPLE 1
Let's assume that you have a local repository that you would like
to add an external vendor library to. In this case we will add the
git-subtree repository as a subdirectory of your already existing
git-extensions repository in ~/git-extensions/.
git-extensions repository in ~/git-extensions/:

First we need to fetch the remote objects
$ cd ~/git-extensions
$ git fetch git://github.com/apenwarr/git-subtree.git master
$ git subtree add --prefix=git-subtree --squash \
git://github.com/apenwarr/git-subtree.git master

'master' needs to be a valid remote ref and can be a different branch
name

Now we add the vendor library with
$ git subtree add --prefix=git-subtree --squash FETCH_HEAD

You can omit the --squash flag, but doing so will increase the number
of commits that are incldued in your local repository.

Expand Down

0 comments on commit 242b20d

Please sign in to comment.