| 5 | == Git repository setup == |
| 6 | |
| 7 | First, initialize local Git repository for copy of trunk from Subversion repository: |
| 8 | |
| 9 | {{{ |
| 10 | git svn init --trunk https://svn.osgeo.org/grass/grass/trunk |
| 11 | }}} |
| 12 | |
| 13 | The option `--trunk` explicitly specifies intention of this operation. |
| 14 | |
| 15 | It is also possible to copy complete repository, including trunk, branches and tags modules. Learn about `--stdlayout` option dedicated for this purpose. However, note that this initial fetch is a time consuming process. (fetching of SVN trunk takes nearly one hour). |
| 16 | |
| 17 | Next, fetch complete copy of GDAL trunk: |
| 18 | |
| 19 | {{{ |
| 20 | git svn --authors-file=/path/to/grass-git-authors.txt fetch |
| 21 | }}} |
| 22 | |
| 23 | The file ''grass-git-authors.txt'' (attached) is used by Git to translate names of SVN committers to Git names which uses format "Full name <e-mail>". Specifying the `--authors-file` option is optional, but recommended. |
| 24 | |
| 25 | It may be a good idea to compress Git repository in order to save some space. For example, SVN trunk occupies nearly 140 MB of disk space. Git can compress it to about 100 MB. Git provides a dedicated command for this purpose [http://www.kernel.org/pub//software/scm/git-core/docs/git-gc.html git-gc]: |
| 26 | |
| 27 | {{{ |
| 28 | $ git gc |
| 29 | }}} |
| 30 | |
| 31 | You can bring your local Git repository up to date against GRASS trunk any time. |
| 32 | |
| 33 | {{{ |
| 34 | $ git svn --authors-file=/path/to/gdal-git-authors.txt rebase |
| 35 | }}} |
| 36 | |
| 37 | The `rebase` command is equivalent to `svn update`. Learn more about `rebase` in [http://www.kernel.org/pub/software/scm/git/docs/git-svn.html git-svn] manual. |
| 38 | |