2

I am trying to migrate my repository from SVN->GIT. I am using to git-svn commands to setup a SVN GIT mirror. I am following https://gist.github.com/ticean/1556967 for reference. Migration from SVN to GIT will be a gradual process. Initially, developers will be using SVN for commits and this mirror will be used to update/sync the GIT repository on a daily basis. Later, everyone will be moved to GIT and current SVN repo will be locked.

Background:-

  1. We are not following the conventional directory structure in SVN.
  2. We have our code placed as https://Path_to_svn/ABC/branches/Branch/Project_Name
  3. We have a git repo https://github.com/UserName/Project_Name1.git

To set up a mirror, I am using the following commands in sequence:-

  1. git svn init https://Path_to_svn/ABC/branches/Branch/Project_name
  2. git svn fetch:- After a long iteration through all the files in the SVN repo, this step completes.
  3. git checkout -b develop
  4. git checkout master
  5. git reset --hard master
  6. git remote add origin1 git@github.com:UserName/Project_Name1.git
  7. git checkout develop
  8. git svn rebase At this point I am getting "unable to determine upstream svn information from working tree history" error. I have tried steps mentioned in Unable to determine upstream SVN information from HEAD history but no help.

Thanks in Advance..!!

Community
  • 1
  • 1
  • Do you understand what you are trying to do in Git? – Tim Biegeleisen Apr 27 '15 at 05:11
  • Is the svn server installed? – cup Apr 27 '15 at 07:41
  • @Tim:- I am trying to create a GIT SVN mirror, for this I am using a intermediate branch at local to checkout the latest code and then merge and commit in GIT. – Karan Malhotra Apr 27 '15 at 09:11
  • @cup:- Yes SVN server is installed. – Karan Malhotra Apr 27 '15 at 09:12
  • Please update your question with what your workflow is intending to accomplish. Giving us the above 8 steps does not make this clear. – Tim Biegeleisen Apr 27 '15 at 09:23
  • @Tim:- I have updated the details. Let me know if further details are required. Also, please refer to https://gist.github.com/ticean/1556967. I am trying to achieve a similar functionality. – Karan Malhotra Apr 27 '15 at 10:30
  • 1
    The GitHub documentation you are using is full of problems. Please read [this SO article](http://stackoverflow.com/questions/296975/how-do-i-tell-git-svn-about-a-remote-branch-created-after-i-fetched-the-repo) which likely contains the information you need. What you are trying to do is very non trivial, so brew up a fresh pot of coffee. – Tim Biegeleisen Apr 27 '15 at 12:15
  • You should really consider migrating to git completely. Why stick to svn?We just did ourselves and for all colleagues not confident with GIT they can mostly remain their working flow. – Flowkap Jun 02 '17 at 11:38

0 Answers0