UP | HOME

Git Svn

1. git svn init/fetch

  git svn init [-s] URL
  git svn fetch -r xxx|HEAD
    a) it gets out 'all' branches/tags/trunk when no specific -r
    b) by change some at branch, chdir to branches folder and play with git
    c) if specify with -r, means "Just want to checkout that revision"
                           then try git svn rebase to update to HEAD
  git svn rebase

2. git svn clone

  # if any problems with init/fetch, just clone and seems this is recommanded...
  # seem should no targe name specified after URL
  # verify with git branch -r should show all svn branches and tags
  git svn clone [URL]

3. git svn branch

  # create svn branch
  git svn branch [svn_branch_1]

  # set up local branch to dcommit to svn branch
  git branch [local_branch_name] remotes/svn_branch_name

  # do change at git local branch and merge into master with
  git merge --squash
  git commit
  git svn dcommit

4. alternative with svn merge

  svn mergeinfo ... :
    git log master..branchx (diff commits that in branchx but master)
    git branch [--no-merged|--merged]

  svn merge --dry-run
    git merge --no-commit --no-ff