DarkMatter in Cyberspace
  • Home
  • Categories
  • Tags
  • Archives

Convert Git Repo to Subversion Repo


The process of converting a git repo to subversion repo is:

  1. Build the remote (empty) svn repo;

  2. Clone the svn repo to local host, which creates a remote branch git-svn;

  3. Checkout the remote svn branch, which creates a local branch git-svn;

  4. Pull the remote git repo to local master branch;

  5. Merge all commits on master to git-svn;

  6. Commit back to svn repo with dcommit command;

The commands:

sudo apt install git-svn
git svn clone svn://192.168.110.3/Aomsc
git svn fetch
git checkout remotes/git-svn
git remote add gitrepo git@code.aliyun.com:znbt/428doc.git
git pull gitepo master
git checkout master
git rebase --onto git-svn --root master
git svn dcommit


Published

Sep 14, 2017

Last Updated

Sep 14, 2017

Category

Tech

Tags

  • git 36
  • subversion 4

Contact

  • Powered by Pelican. Theme: Elegant by Talha Mansoor