The process of converting a git repo to subversion repo is:
-
Build the remote (empty) svn repo;
-
Clone the svn repo to local host, which creates a remote branch git-svn;
-
Checkout the remote svn branch, which creates a local branch git-svn;
-
Pull the remote git repo to local master branch;
-
Merge all commits on master to git-svn;
-
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