Tech /

Git Svn Notes

edit SideBar

Git Svn Notes

git-svn setup tracking:

  • trunk as master
  • branches/$username/* for personal branches
  • tags


git svn clone --username "$username" \
    -T trunk -t tags -b "branches/$username" \


        repositoryformatversion = 0
        filemode = true
        bare = false
        logallrefupdates = true
        ignorecase = true
[svn-remote "svn"]
        url =
        fetch = $project/trunk:refs/remotes/trunk
        branches = $project/branches/$username/*:refs/remotes/*
        tags = $project/tags/*:refs/remotes/tags/*


  1. Using svn checkout HEAD from the https:// repository. Cache your authentication credentials so git-svn can use them if necessary. This is important.
  2. If there haven't been any commits since your last git-svn rebase make one now e.g. touch kick; svn add kick; svn commit -m "Kicking git-svn". This is important.
  3. Now, in your git-svn checkout edit .git/config. In the svn section, comment out the old url entry (hash or semicolon are valid) and add a new one.
  4. git-svn fetch to fetch a new revision from the new repository
  5. In .git/config comment out the new url entry and restore the old one.
  6. git-svn rebase -l to perform a local rebase
  7. In .git/config comment out the old url entry and restore the new one.
  8. Enjoy the fresh minty taste.
Recent Changes (All) | Edit SideBar Page last modified on 21 October 2011, at 12:40 PM UTC Edit Page | Page History
Powered by PmWiki