git-svn setup tracking:
- trunk as master
- branches/$username/* for personal branches
- tags
Clone
git svn clone --username "$username" \
-T trunk -t tags -b "branches/$username" \
https://svn.example.com/repo
Config
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
[svn-remote "svn"]
url = https://svn.example.com/repo
fetch = $project/trunk:refs/remotes/trunk
branches = $project/branches/$username/*:refs/remotes/*
tags = $project/tags/*:refs/remotes/tags/*
Relocate
- Using svn checkout HEAD from the https:// repository. Cache your authentication credentials so git-svn can use them if necessary. This is important.
- 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. - 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.
-
git-svn fetch
to fetch a new revision from the new repository - In .git/config comment out the new url entry and restore the old one.
-
git-svn rebase -l
to perform a local rebase - In .git/config comment out the old url entry and restore the new one.
- Enjoy the fresh minty taste.