Skip to content

Instantly share code, notes, and snippets.

@shyamjos
Created May 12, 2019 17:47
Show Gist options
  • Save shyamjos/19d5ce8f1bdb218ab4dba55e7984260f to your computer and use it in GitHub Desktop.
Save shyamjos/19d5ce8f1bdb218ab4dba55e7984260f to your computer and use it in GitHub Desktop.
How to push a git repo to svn
#Install svn and git-svn packages in your local machine
sudo apt get install subversion git-svn
create a SVN repo for the git project you want to push
svn mkdir --parents --username myusername http://192.168.60.222:8181/svn/my_projects/my_git_app/trunk -m "new svn repo for git code"
#Initialize svn repo with git url
git svn init http://192.168.60.222:8181/svn/my_projects/my_git_app -s
# step 1
git svn fetch
# step 2
git rebase origin/trunk
#step 3
git status
#step 4
git add (conflicted-files)
# step 5
git rebase --continue
# step 6
repeat step 3
# step 7
git svn dcommit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment