How to correctly clone --recursive git repository on Windows?
<h3>How to correctly clone --recursive git repository on Windows?</h3>

<p>My git version is:</p>

<pre><code>git --version
git version 2.8.2
</code></pre>

<p>When I clone a repository with <code>--recursive</code> using this command line:
<code>
git clone --recursive https://github.com/evandrocoan/SublimeTextStudio.git "D:/User/Dropbox/Applications/SoftwareVersioning/SublimeText/Data/Packages"
</code></p>

<p>And this were the console output: (everything ok, without errors)</p>

<pre><code>D:\User\Dropbox\Applications\SoftwareVersioning\SublimeText&gt;git clone --recursive https://github.com/evandrocoan/SublimeTextStudio.git "D:/User/Dropbox/Applications/SoftwareVersioning/Su
blimeText/Data/Packages"
Cloning into 'D:/User/Dropbox/Applications/SoftwareVersioning/SublimeText/Data/Packages'...
remote: Counting objects: 827, done.
remote: Compressing objects: 100% (244/244), done.
remote: Total 827 (delta 139), reused 0 (delta 0), pack-reused 563eceiving objects:
Receiving objects: 100% (827/827), 3.64 MiB | 691.00 KiB/s, done.
Resolving deltas: 100% (452/452), done.
Checking connectivity... done.
Submodule 'ANSIescape' (https://github.com/evandrocoan/SublimeANSI) registered for path 'ANSIescape'
Submodule 'BBCode' (https://github.com/evandrocoan/BBCode) registered for path 'BBCode'
Submodule 'Boxy Theme' (https://github.com/evandrocoan/st-boxy) registered for path 'Boxy Theme'
Submodule 'Package Control' (https://github.com/evandrocoan/package_control) registered for path 'Package Control'
Submodule 'SideBarEnhancements' (https://github.com/evandrocoan/SideBarEnhancements) registered for path 'SideBarEnhancements'
Submodule 'SublimeAmxxPawn' (https://github.com/evandrocoan/SublimeAmxxPawn) registered for path 'SublimeAmxxPawn'
Submodule 'SublimeNotepadPlusPlusTheme' (https://github.com/evandrocoan/SublimeNotepadPlusPlusTheme) registered for path 'SublimeNotepadPlusPlusTheme'
Submodule 'SublimeTextToolBar' (https://github.com/evandrocoan/SublimeTextToolBar) registered for path 'SublimeTextToolBar'
Submodule 'Theme - SoDaReloaded' (https://github.com/evandrocoan/SoDaReloaded-Theme) registered for path 'Theme - SoDaReloaded'
Submodule 'Theme - Soda' (https://github.com/evandrocoan/soda-theme) registered for path 'Theme - Soda'
Cloning into 'ANSIescape'...
remote: Counting objects: 200, done.
Receiving objects:   3% (6/200)remote: Total 200 (delta 0), reused 0 (delta 0), pack-reused 200
Receiving objects: 100% (200/200), 45.36 KiB | 0 bytes/s, done.
Resolving deltas: 100% (120/120), done.
Checking connectivity... done.
Submodule path 'ANSIescape': checked out 'd93f5ce408a28252c73d11a5b0b1b456162e8bac'
Cloning into 'BBCode'...
remote: Counting objects: 86, done.
remote: Compressing objects: 100% (11/11), done.
remote: Total 86 (delta 4), reused 0 (delta 0), pack-reused 74
Unpacking objects: 100% (86/86), done.
Checking connectivity... done.
Submodule path 'BBCode': checked out '51d4813dc2e7a99e2c8afa5ce1cf71bbebf1a88d'
Cloning into 'Boxy Theme'...
remote: Counting objects: 13403, done.
remote: Compressing objects: 100% (58/58), done.
remote: Total 13403 (delta 28), reused 0 (delta 0), pack-reused 13345
Receiving objects: 100% (13403/13403), 6.84 MiB | 410.00 KiB/s, done.
Resolving deltas: 100% (7243/7243), done.
Checking connectivity... done.
Submodule path 'Boxy Theme': checked out 'f5c8f1dd3f69df64ca0cd45dbd8f25456fc53e58'
Cloning into 'Package Control'...
remote: Counting objects: 4950, done.
remote: Compressing objects: 100% (73/73), done.
remote: Total 4950 (delta 43), reused 0 (delta 0), pack-reused 4877
Receiving objects: 100% (4950/4950), 1.73 MiB | 643.00 KiB/s, done.
Resolving deltas: 100% (3476/3476), done.
Checking connectivity... done.
Submodule path 'Package Control': checked out '5195e29c0a8e12913d1fb7aaaf1370942d7f2409'
Cloning into 'SideBarEnhancements'...
remote: Counting objects: 1506, done.
remote: Total 1506 (delta 0), reused 0 (delta 0), pack-reused 1506
Receiving objects: 100% (1506/1506), 468.76 KiB | 517.00 KiB/s, done.
Resolving deltas: 100% (940/940), done.
Checking connectivity... done.
Submodule path 'SideBarEnhancements': checked out '3c7957f2446b442931c3731358a79750687059d2'
Cloning into 'SublimeAmxxPawn'...
remote: Counting objects: 287, done.
remote: Compressing objects: 100% (123/123), done.
remote: Total 287 (delta 164), reused 282 (delta 159), pack-reused 0
Receiving objects: 100% (287/287), 149.52 KiB | 0 bytes/s, done.
Resolving deltas: 100% (164/164), done.
Checking connectivity... done.
Submodule path 'SublimeAmxxPawn': checked out 'df13519f98d3278fc025d01d3f39ff8ae2ff64a7'
Cloning into 'SublimeNotepadPlusPlusTheme'...
remote: Counting objects: 163, done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 163 (delta 1), reused 0 (delta 0), pack-reused 157
Receiving objects: 100% (163/163), 33.82 KiB | 0 bytes/s, done.
Resolving deltas: 100% (65/65), done.
Checking connectivity... done.
Submodule path 'SublimeNotepadPlusPlusTheme': checked out '4cbca8d3717c4232ea4783579d82c45127623666'
Cloning into 'SublimeTextToolBar'...
remote: Counting objects: 48, done.
remote: Total 48 (delta 0), reused 0 (delta 0), pack-reused 48
Unpacking objects: 100% (48/48), done.
Checking connectivity... done.
Submodule path 'SublimeTextToolBar': checked out '04d97345937a9181b95c3b326ed1acc1bda60637'
Cloning into 'Theme - SoDaReloaded'...
remote: Counting objects: 1411, done.
remote: Total 1411 (delta 0), reused 0 (delta 0), pack-reused 1411eceiving objects
Receiving objects: 100% (1411/1411), 5.60 MiB | 424.00 KiB/s, done.
Resolving deltas: 100% (703/703), done.
Checking connectivity... done.
Submodule path 'Theme - SoDaReloaded': checked out 'ff9967a98734fc8f46e07bc7cb86115d325c9225'
Cloning into 'Theme - Soda'...
remote: Counting objects: 3156, done.
remote: Total 3156 (delta 0), reused 0 (delta 0), pack-reused 3156
Receiving objects: 100% (3156/3156), 5.70 MiB | 366.00 KiB/s, done.
Resolving deltas: 100% (1157/1157), done.
Checking connectivity... done.
Submodule path 'Theme - Soda': checked out 'd47df56b20741eda7ada4d1ed7e730bc4203b0d3'

D:\User\Dropbox\Applications\SoftwareVersioning\SublimeText&gt;
</code></pre>

<p>All the sub-modules end up within a <code>.git</code> file, instead of a <code>.git</code> folder, containing its git info:</p>

<p><img src="https://i.imgur.com/PBSLQwq.png" alt="Imgur"></p>

<p>That <code>.git</code> file contents are:</p>

<pre><code>gitdir: /cygdrive/d/User/Dropbox/Applications/SoftwareVersioning/SublimeText/Data/Packages/.git/modules/SublimeNotepadPlusPlusTheme
</code></pre>

<p>The file should probably be a Linux symlink, but worthless on windows. It is all absolute, a horrible thing as the <code>Main</code> repository folder is just one level above. It should be relative with <code>../</code>.</p>

<p>On the folder <code>Data/Packages/.git/modules/</code>, I got all the submodules <code>.git</code> folders:</p>

<p><img src="https://i.imgur.com/e47cblc.png" alt="Imgur"></p>

<p>And when I open the master repository with Smartgit, it shows all my cloned sub-modules as <code>not found</code>:</p>

<p><img src="https://i.imgur.com/ZLCojPb.png" alt="Imgur"></p>