Project

General

Profile

Downloading sources with older version of Git » History » Version 1

Pavel Shved, 08/03/2010 11:36 PM

1 1 Pavel Shved
h1. Downloading sources with older version of Git
2
3
If you have a prior to 1.6.6 version of Git, you can''t use @git clone --recursive@, because the feature was only introduced in 1.6.6. Since git uses recursive submodules (one submodule is inside the other), it would be tedious to make you change directories and run many commands manually.
4
5
So, we supply you with some automation that can do it for you.  First, add the following lines to @~/.gitconfig@:
6
7
<pre>
8
[alias]
9
       subinit = !"git submodule init; git submodule update ; git submodule foreach ''git subinit''"
10
</pre>
11
12
Note that the name of this alias (at left-hand side of @=@ sign) should match the one invoked at the end of this line!
13
14
Then clone without @--recursive@, and invoke the command you''ve just added to @~/.gitconfig@ in the new working directory:
15
16
<pre>
17
    $ git clone git://forge.ispras.ru/ldv-tools.git
18
    $ cd ldv-tools
19
    $ git subinit
20
</pre>