-
Notifications
You must be signed in to change notification settings - Fork 9
/
svn2git.sh
executable file
·23 lines (18 loc) · 1.08 KB
/
svn2git.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# A one-time conversion from SVN to Git
# svn2git fails with an error
# 2>&1 git branch --track "0.2.0" "remotes/svn/0.2.0"
#svn2git http://svn.code.sf.net/p/bleachbit/code/ --exclude bonus --exclude misc --tags releases
# This method loses release history, but it keeps all the commits (except for the bonus and misc directories).
time git svn clone http://svn.code.sf.net/p/bleachbit/code/trunk
# Fix committer (there was only one direct committer)
cd trunk
git filter-branch -f --env-filter "GIT_AUTHOR_NAME='Andrew Ziem'; GIT_AUTHOR_EMAIL='[email protected]'; GIT_COMMITTER_NAME='Andrew Ziem'; GIT_COMMITTER_EMAIL='[email protected]';" HEAD
# Push to Github
git remote add origin [email protected]:az0/bleachbit.git
git push origin master
# Repeat for misc
time git svn clone http://svn.code.sf.net/p/bleachbit/code/misc
cd misc
git filter-branch -f --env-filter "GIT_AUTHOR_NAME='Andrew Ziem'; GIT_AUTHOR_EMAIL='[email protected]'; GIT_COMMITTER_NAME='Andrew Ziem'; GIT_COMMITTER_EMAIL='[email protected]';" HEAD
git remote add origin [email protected]:az0/bleachbit-misc.git
git push origin master