diff --git a/doc/bitbake-user-manual/bitbake-user-manual-fetching.rst b/doc/bitbake-user-manual/bitbake-user-manual-fetching.rst
index f357765b7..e1781085f 100644
--- a/doc/bitbake-user-manual/bitbake-user-manual-fetching.rst
+++ b/doc/bitbake-user-manual/bitbake-user-manual-fetching.rst
@@ -658,10 +658,12 @@ This fetcher supports the following parameters:

 -  *"manifest":* Name of the manifest file (default: ``default.xml``).

+-  *"fetch_submodules":* Whether to fetch Git submodules of a project on the server (default: ``0``).
+
 Here are some example URLs::

    SRC_URI = "repo://REPOROOT;protocol=git;branch=some_branch;manifest=my_manifest.xml"
-   SRC_URI = "repo://REPOROOT;protocol=file;branch=some_branch;manifest=my_manifest.xml"
+   SRC_URI = "repo://REPOROOT;protocol=file;branch=some_branch;manifest=my_manifest.xml;fetch_submodules=1"

 .. _az-fetcher:

diff --git a/lib/bb/fetch2/repo.py b/lib/bb/fetch2/repo.py
index fa4cb8149..de01bcb66 100644
--- a/lib/bb/fetch2/repo.py
+++ b/lib/bb/fetch2/repo.py
@@ -38,6 +38,7 @@ class Repo(FetchMethod):
         ud.proto = ud.parm.get('protocol', 'git')
         ud.branch = ud.parm.get('branch', 'master')
         ud.manifest = ud.parm.get('manifest', 'default.xml')
+        ud.fetch_submodules = ud.parm.get('fetch_submodules', '0') == '1'
         if not ud.manifest.endswith('.xml'):
             ud.manifest += '.xml'

@@ -65,8 +66,12 @@ class Repo(FetchMethod):
             bb.fetch2.check_network_access(d, "%s init -m %s -b %s -u %s://%s%s%s" % (ud.basecmd, ud.manifest, ud.branch, ud.proto, username, ud.host, ud.path), ud.url)
             runfetchcmd("%s init -m %s -b %s -u %s://%s%s%s" % (ud.basecmd, ud.manifest, ud.branch, ud.proto, username, ud.host, ud.path), d, workdir=repodir)

-        bb.fetch2.check_network_access(d, "%s sync %s" % (ud.basecmd, ud.url), ud.url)
-        runfetchcmd("%s sync" % ud.basecmd, d, workdir=repodir)
+        sync_cmd = "sync"
+        if ud.fetch_submodules:
+            sync_cmd = "%s --fetch-submodules" % sync_cmd
+
+        bb.fetch2.check_network_access(d, "%s %s %s" % (ud.basecmd, sync_cmd, ud.url), ud.url)
+        runfetchcmd("%s %s" % (ud.basecmd, sync_cmd), d, workdir=repodir)

         scmdata = ud.parm.get("scmdata", "")
         if scmdata == "keep":
