jeudi 17 mai 2018
Convert SVN to Git
Par Arnaud Charlier, jeudi 17 mai 2018 à 11:57 :: Linux et Debian
- Get repositotry Commiters
svn log -q https://yourRepoUrl | awk -F '|' '/^r/ {sub("^ ", "", $2); sub(" $", "", $2); print $2" = "$2" <"$2">"}' | sort -u > authors-transform.txt- Checkout / Convert To Git
git svn --authors-file=authors-transform.txt clone https://yourRepoUrl --trunk=trunk --branches=branches --tags=tags- List all branch
git branch -a- Checkout the Branch Localy
git checkout remotes/origin/v2 git checkout master-Create Local Branch From Remote Branch
git branch v2 remotes/origin/v2-Push Publish on Github
git remote add origin https://user@gitRepos/theGitProject.git git push -u origin master git push --all git push --tags