Changes between Version 16 and Version 17 of UsingGitToMaintainGDALWorkflow


Ignore:
Timestamp:
Oct 22, 2011, 6:04:43 AM (13 years ago)
Author:
Mateusz Łoskot
Comment:

Explained use of svn2git. Use svn2git to maintain GDAL at GitHub

Legend:

Unmodified
Added
Removed
Modified
  • UsingGitToMaintainGDALWorkflow

    v16 v17  
    33This article describes how to maintain GDAL development workflow with [http://git-scm.com/ Git] against GDAL Subversion repository.
    44
     5== Git repository setup using svn2git ==
     6
     7[http://rubygems.org/gems/svn2git svn2git] is a tool written in Ruby which makes it easy to mirror SVN repository in Git, especially if one wants to mirror complete SVN repository based on the standard layout with: turnk, tags and branches. svn2git also makes it easy to update the Git mirror pulling latest changes from SVN.
     8
     9Here is example of initial import of GDAL repository from SVN to Git:
     10
     11{{{
     12$ svn2git http://svn.osgeo.org/gdal/ --exclude sandbox --exclude spike
     13}}}
     14
     15It will import content of trunk, tags and branches.
     16
     17Next, one may want to frequently update the Git repository pulling latest changes from SVN:
     18
     19{{{
     20$ svn2git --rebase
     21}}}
     22
     23The local repository can be published on remote server like GitHub this way:
     24
     25{{{
     26$ git remote add origin git@github.com:GITHUB_USERNAME/REPO_NAME.git
     27$ git push origin master
     28}}}
     29
     30Then, it is ready to keep the Git mirror in remote location (e.g. GitHub) updated:
     31
     32{{{
     33$ svn2git --rebase
     34$ git push origin master
     35}}}
     36
     37== Git repository setup using git-svn ==
     38
    539Note, this is '''not a complete guide''' of how to use ''git-svn'', but a quick list of basic operations.
    6 
    740Requirements: [http://git-scm.com/ git] and [http://www.kernel.org/pub/software/scm/git/docs/git-svn.html git-svn]
    8 
    9 == Git repository setup ==
    1041
    1142First, initialize local Git repository for copy of trunk form Subversion:
     
    79110== GitHub Mirror ==
    80111
    81 I try to maintain up-to-date Git repository with mirror of GDAL Subversion trunk. It is available as [https://github.com/mloskot/gdal github.com/mloskot/gdal] maintained by [https://github.com/mloskot/ mloskot].
     112I try to maintain up-to-date Git repository with mirror of GDAL Subversion trunk, branches and tags.
     113It is available as [https://github.com/mloskot/gdal github.com/mloskot/gdal] maintained by [https://github.com/mloskot/ mloskot].
     114I keep this Git repository updated using the svn2git utility.
    82115
    83116Note, if you are GDAL committer, clone of this repository will not allow you to issue ''git svn dcommit'' command to push your changes back to GDAL trunk. If you expect this functionality, you need to maintain Git repository of GDAL trunk on your own according to the steps described above. Quoting one of [http://stackoverflow.com/questions/1880405/can-different-git-svn-clones-of-the-same-svn-repository-expect-to-be-able-to-shar/1880487#1880487 best practices listed here]: