Changes between Initial Version and Version 1 of UsingGitToMaintainGDALWorkflow


Ignore:
Timestamp:
Feb 13, 2010, 12:56:18 PM (14 years ago)
Author:
Mateusz Łoskot
Comment:

Created page explaining basics of use of git-svn against GDAL SVN

Legend:

Unmodified
Added
Removed
Modified
  • UsingGitToMaintainGDALWorkflow

    v1 v1  
     1= Using Git to maintain GDAL workflow =
     2
     3This article describes how to maintain GDAL development workflow with Git against GDAL Subversion repository.
     4
     5Note, this is '''not a complete guide''' of how to use ''git-svn'', but a quick list of basic operations.
     6
     7Requirements: [http://git-scm.com/ git] and [http://www.kernel.org/pub/software/scm/git/docs/git-svn.html git-svn]
     8
     9First, initialize local repository for copy of trunk form Subversion:
     10
     11{{{
     12git svn init --trunk https://svn.osgeo.org/gdal/trunk/
     13}}}
     14
     15The option ''--trunk'' explicitly specifies intention of this operation.
     16
     17It is also possible to copy complete repository, including trunk, branches and tags modules. Learn about ''--stdlayout'' option dedicated for this purpose.
     18
     19Next, fetch complete copy of GDAL trunk:
     20
     21{{{
     22git svn --authors-file=/path/to/gdal-git-authors.txt fetch
     23}}}
     24
     25The file ''gdal-git-authors.txt'' (attached) is used by Git to translate names of SVN committers to Git names which uses format "Full name <e-mail>".
     26
     27You can bring your local Git repository up to date against GDAL trunk any time.
     28
     29{{{
     30$ git svn rebase
     31}}}
     32
     33The ''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.
     34
     35After 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.
     36
     37{{{
     38$ git commit -m "my big feature"
     39}}}
     40
     41If you are GDAL committer, you can push your changes to GDAL Subversion repository directly from your local Git repository of GDAL trunk:
     42
     43{{{
     44$ git svn dcommit --dry-run
     45$ git svn dcommit
     46}}}
     47
     48You 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):
     49
     50{{{
     51git push --all git@gitorious.org:yourproject/gdal-svn-trunk.git
     52}}}
     53
     54== Resources ==
     55
     56 * [http://www.kernel.org/pub/software/scm/git/docs/git-svn.html git-svn] manual
     57 * [http://justaddwater.dk/2009/03/09/using-git-for-svn-repositories-workflow/ Using Git for SVN Repositories Workflow]
     58 * [http://flavio.castelli.name/howto_use_git_with_svn Howto use Git and svn together]
     59 * [http://trac.parrot.org/parrot/wiki/git-svn-tutorial Using git to maintain Subversion branches]
     60 * [http://michael-prokop.at/blog/2007/12/03/git-svn-in-30-minutes/ git-svn in 30 minutes]