Created
December 27, 2017 18:17
-
-
Save forceedge01/799a69707c6d418c78232af2abc26cd7 to your computer and use it in GitHub Desktop.
Sync svn to git repo from scratch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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