Changes between Version 11 and Version 12 of git-svn-tutorial

Show
Ignore:
Timestamp:
08/08/09 09:23:34 (5 years ago)
Author:
bacek
Comment:

Tracking svn branches

Legend:

Unmodified
Added
Removed
Modified
  • git-svn-tutorial

    v11 v12  
    109109Other developers may access your local branches, but in order to do so, they would need to be able to access your git repository. 
    110110 
     111== Tracking SVN branches with GIT == 
     112 
     113Start svn branch in git. 
     114{{{ 
     115    git svn branch -m "Branch for work on extra cool feature" extra_cool_feature 
     116    git checkout extra_cool_feature_local remotes/extra_cool_feature # to avoid warning from git about ambiguity 
     117    ... hack/git commit/git commit --amend/git rebase -i HEAD~10/... as usual 
     118}}} 
     119 
     120dcommit to svn 
     121{{{ 
     122    git svn dcommit --dry-run # check that it will commit to proper svn branch. 
     123    git svn dcommit 
     124}}} 
     125 
     126Merging trunk into branch 
     127{{{ 
     128    git checkout master 
     129    git svn rebase 
     130    git checkout extra_cool_branch 
     131    git merge --squash master 
     132    git commit -m "Bring branch up-to-date with trunk"  
     133}}} 
     134 
     135Merging branch back to trunk 
     136{{{ 
     137    git checkout master 
     138    git svn rebase 
     139    git merge --squash extra_cool_feature 
     140    git commit -m "Merge branch into trunk"  
     141}}} 
     142 
     143Hints and caveats: 
     144 
     145 1. Don't try to rebase already dcommited changes. They are not belong to you anymore. 
     146  
     147 2. Always run "git svn dcommit --dry-run" before real commit to check in which branch your changes will be committed. 
     148  
     149 3. Always merge branches with "--squash". Otherwise git-svn will do it for you and can epicly fail sometime. 
     150 
     151 4. svn isn't smart enough to track merges. So, don't try to merge branches with pure svn and git-svn on same branch. 
     152 
     153      
     154 
    111155== Ignoring generated files == 
    112156