Skip to content

Instantly share code, notes, and snippets.

@forceedge01
Created December 27, 2017 18:17
Embed
What would you like to do?
Sync svn to git repo from scratch
svn checkout -r HEAD <svn repo url> <dir>
cd <repo>
git init
git remote add origin <origin>
git fetch origin
# In order to get this working, we have to have an initial commit. So commit one of the files but don't push yet.
git add build.xml
git commit -m "Commit to get svn to git sync functional"
# This removes any of the untracked files being put in.
git reset --hard origin/master
git merge origin/master
svn update
git add .
git commit -m "Changes pulled from svn repo."
git push --all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment