Skip to content

Commit

Permalink
git supports relative submodules URLs
Browse files Browse the repository at this point in the history
Example: ../sibling.git
  • Loading branch information
Thannoy committed May 20, 2015
1 parent a113612 commit 1312971
Showing 1 changed file with 2 additions and 2 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 @@ -21,7 +21,7 @@ This lets you clone another repository into your project and keep your commits s

We'll walk through developing a simple project that has been split up into a main project and a few sub-projects.

Let's start by adding an existing Git repository as a submodule of the repository that we're working on. To add a new submodule you use the `git submodule add` command with the URL of the project you would like to start tracking. In this example, we'll add a library called ``DbConnector''.
Let's start by adding an existing Git repository as a submodule of the repository that we're working on. To add a new submodule you use the `git submodule add` command with the absolute or relative URL of the project you would like to start tracking. In this example, we'll add a library called ``DbConnector''.

[source,console]
----
Expand Down Expand Up @@ -69,7 +69,7 @@ This is how other people who clone this project know where to get the submodule

[NOTE]
=====
Since the URL in the .gitmodules file is what other people will first try to clone/fetch from, make sure to use a URL that they can access if possible. For example, if you use a different URL to push to than others would to pull from, use the one that others have access to. You can overwrite this value locally with `git config submodule.DbConnector.url PRIVATE_URL` for your own use.
Since the URL in the .gitmodules file is what other people will first try to clone/fetch from, make sure to use a URL that they can access if possible. For example, if you use a different URL to push to than others would to pull from, use the one that others have access to. You can overwrite this value locally with `git config submodule.DbConnector.url PRIVATE_URL` for your own use. When applicable, a relative URL can be helpful.
=====

The other listing in the `git status` output is the project folder entry.
Expand Down

0 comments on commit 1312971

Please sign in to comment.