I have a SVN branch which I want to move to git but with all the history of the branch. I tried a lot of permutations and combinations as below but none of them worked. Could someone please help me? I am new to git. I have tried svn to git migration without history and it has worked properly.
svn log -q <SVN_BRANCH_REPO> | awk -F '|' '/^r/ {sub("^ ", "", $2); sub(" $", "", $2); print $2" = "$2" <"$2">"}' | sort -u > users.txt
git svn clone --stdlayout --no-metadata --authors-file=users.txt <SVN_BRANCH_REPO> tmp
the tmp here returns an empty directory. I tried :
git svn clone -r HEAD --no-metadata --authors-file=users.txt <SVN_BRANCH_REPO> tmp1
Post this I did the following steps:
cd tmp1
git svn fetch
git remote add origin git@gitlab.com:mehtakar/gitexample.git
git commit --amend --reset-author
git push -u origin master
this also does not commit the history in the master branch. Could someone please let me know what am I missing?