= Using Git to maintain GDAL workflow = This article describes how to maintain GDAL development workflow with Git against GDAL Subversion repository. Note, this is '''not a complete guide''' of how to use ''git-svn'', but a quick list of basic operations. Requirements: [http://git-scm.com/ git] and [http://www.kernel.org/pub/software/scm/git/docs/git-svn.html git-svn] First, initialize local repository for copy of trunk form Subversion: {{{ git svn init --trunk https://svn.osgeo.org/gdal/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. Next, fetch complete copy of GDAL trunk: {{{ git svn --authors-file=/path/to/gdal-git-authors.txt fetch }}} The file ''gdal-git-authors.txt'' (attached) is used by Git to translate names of SVN committers to Git names which uses format "Full name ". You can bring your local Git repository up to date against GDAL trunk any time. {{{ $ git svn 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. After this step, you maintain your own local repository of GDAL trunk. You can proceed with your own development, make changes and commit them to your local repository. {{{ $ git commit -m "my big feature" }}} If you are GDAL committer, you can push your changes to GDAL Subversion repository directly from your local Git repository of GDAL trunk: {{{ $ git svn dcommit --dry-run $ git svn dcommit }}} You can also push the local copy to your own Git remote repository to share your development experiments, then others will be able to ''clone'' it. For example, you can push it to [http://gitorious.org/ Gitorious] (''yourproject'' and ''gdal-svn-trunk'' denote names of your own choice): {{{ git push --all git@gitorious.org:yourproject/gdal-svn-trunk.git }}} == Resources == * [http://www.kernel.org/pub/software/scm/git/docs/git-svn.html git-svn] manual * [http://justaddwater.dk/2009/03/09/using-git-for-svn-repositories-workflow/ Using Git for SVN Repositories Workflow] * [http://flavio.castelli.name/howto_use_git_with_svn Howto use Git and svn together] * [http://trac.parrot.org/parrot/wiki/git-svn-tutorial Using git to maintain Subversion branches] * [http://michael-prokop.at/blog/2007/12/03/git-svn-in-30-minutes/ git-svn in 30 minutes]