Changes between Version 16 and Version 17 of UsingGitToMaintainGDALWorkflow
- Timestamp:
- Oct 22, 2011, 6:04:43 AM (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
UsingGitToMaintainGDALWorkflow
v16 v17 3 3 This article describes how to maintain GDAL development workflow with [http://git-scm.com/ Git] against GDAL Subversion repository. 4 4 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 9 Here 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 15 It will import content of trunk, tags and branches. 16 17 Next, one may want to frequently update the Git repository pulling latest changes from SVN: 18 19 {{{ 20 $ svn2git --rebase 21 }}} 22 23 The 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 30 Then, 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 5 39 Note, this is '''not a complete guide''' of how to use ''git-svn'', but a quick list of basic operations. 6 7 40 Requirements: [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 ==10 41 11 42 First, initialize local Git repository for copy of trunk form Subversion: … … 79 110 == GitHub Mirror == 80 111 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]. 112 I try to maintain up-to-date Git repository with mirror of GDAL Subversion trunk, branches and tags. 113 It is available as [https://github.com/mloskot/gdal github.com/mloskot/gdal] maintained by [https://github.com/mloskot/ mloskot]. 114 I keep this Git repository updated using the svn2git utility. 82 115 83 116 Note, 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]: