Skip to content

Commit

Permalink
Merge pull request #928 from mdbrlh/update-recursive-clone-option
Browse files Browse the repository at this point in the history
Update --recursive to --recurse-submodules
  • Loading branch information
ben authored Dec 1, 2017
2 parents 6e09183 + dc9f776 commit 586692a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions book/07-git-tools/sections/submodules.asc
Original file line number Diff line number Diff line change
Expand Up @@ -185,11 +185,11 @@ Submodule path 'DbConnector': checked out 'c3f01dc8862123d317dd46284b05b6892c7b2
Now your `DbConnector` subdirectory is at the exact state it was in when you committed earlier.

There is another way to do this which is a little simpler, however.
If you pass `--recursive` to the `git clone` command, it will automatically initialize and update each submodule in the repository.
If you pass `--recurse-submodules` to the `git clone` command, it will automatically initialize and update each submodule in the repository.

[source,console]
----
$ git clone --recursive https://github.com/chaconinc/MainProject
$ git clone --recurse-submodules https://github.com/chaconinc/MainProject
Cloning into 'MainProject'...
remote: Counting objects: 14, done.
remote: Compressing objects: 100% (13/13), done.
Expand Down
2 changes: 1 addition & 1 deletion book/C-git-commands/1-git-commands.asc
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ In <<_getting_git_on_a_server>> we look at using the `--bare` option to create a

In <<_bundling>> we use it to unbundle a bundled Git repository.

Finally, in <<_cloning_submodules>> we learn the `--recursive` option to make cloning a repository with submodules a little simpler.
Finally, in <<_cloning_submodules>> we learn the `--recurse-submodules` option to make cloning a repository with submodules a little simpler.

Though it's used in many other places through the book, these are the ones that are somewhat unique or where it is used in ways that are a little different.

Expand Down

0 comments on commit 586692a

Please sign in to comment.