]> git.ipfire.org Git - thirdparty/git.git/blobdiff - Documentation/git-submodule.txt
Merge branch 'jl/submodule-add-relurl-wo-upstream' into maint
[thirdparty/git.git] / Documentation / git-submodule.txt
index 1a16ff60448a72bebcba2daff7dbabc5feed8a4c..585f03681b7aca236679a3f3d507f02c6736fdf9 100644 (file)
@@ -78,7 +78,9 @@ to exist in the superproject. If <path> is not given, the
 <repository> is the URL of the new submodule's origin repository.
 This may be either an absolute URL, or (if it begins with ./
 or ../), the location relative to the superproject's origin
-repository.
+repository. If the superproject doesn't have an origin configured
+the superproject is its own authoritative upstream and the current
+working directory is used instead.
 +
 <path> is the relative location for the cloned submodule to
 exist in the superproject. If <path> does not exist, then the
@@ -167,7 +169,9 @@ commit for each submodule.
 
 sync::
        Synchronizes submodules' remote URL configuration setting
-       to the value specified in .gitmodules.  This is useful when
+       to the value specified in .gitmodules. It will only affect those
+       submodules which already have an url entry in .git/config (that is the
+       case when they are initialized or freshly added). This is useful when
        submodule URLs change upstream and you need to update your local
        repositories accordingly.
 +
@@ -186,8 +190,10 @@ OPTIONS
 
 -f::
 --force::
-       This option is only valid for the add command.
-       Allow adding an otherwise ignored submodule path.
+       This option is only valid for add and update commands.
+       When running add, allow adding an otherwise ignored submodule path.
+       When running update, throw away local changes in submodules when
+       switching to a different commit.
 
 --cached::
        This option is only valid for status and summary commands.  These