This article describes how to maintain GRASS development workflow with [http://git-scm.com Git] against GRASS Subversion repository. Text of this article is mainly inspired by [http://trac.osgeo.org/gdal/wiki/UsingGitToMaintainGDALWorkflow Using Git to maintain GDAL workflow]. == Git repository setup == First, initialize local Git repository for copy of trunk from Subversion repository: {{{ git svn init --trunk https://svn.osgeo.org/grass/grass/trunk }}} The option `--trunk` explicitly specifies intention of this operation. 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 two hours). Next, fetch complete copy of GDAL trunk: {{{ git svn --authors-file=/path/to/grass-git-authors.txt fetch }}} 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 ". Specifying the `--authors-file` option is optional, but recommended. 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]: {{{ $ git gc }}} You can bring your local Git repository up to date against GRASS trunk any time. {{{ $ git svn --authors-file=/path/to/gdal-git-authors.txt rebase }}} 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. == Resources == * [http://trac.osgeo.org/gdal/wiki/UsingGitToMaintainGDALWorkflow Using Git to maintain GDAL workflow]