的git svn
documentation介紹了Subversion的軀幹的工作,但有一個骯髒的主人:
# Clone a repo (like git clone):
git svn clone http://svn.example.com/project/trunk
# Enter the newly cloned directory:
cd trunk
# You should be on master branch, double-check with 'git branch'
git branch
# Do some work and commit locally to git:
git commit ...
# Something is committed to SVN, rebase your local changes against the
# latest changes in SVN:
git svn rebase
# Now commit your changes (that were committed previously using git) to SVN,
# as well as automatically updating your working HEAD:
git svn dcommit
# Append svn:ignore settings to the default git exclude file:
git svn show-ignore >> .git/info/exclude
做你的功能分支而非主
git checkout -b feature1
hack ...
git add ...
git commit ...
當你的工作準備好讓你的工作重新進入Subversion,請務必保持你的歷史線性:
git checkout master
git svn rebase
git rebase master feature1
git checkout master
git merge feature1
發貨!
git svn dcommit