From svn to git, with a moved trunk
Now, our current trunk is at:
- use svn revision number in application version
- Is there a synopsis about how to do certain things with different scm tools?
- How can I change the repository url using AnkhSVN 2.x
- Convert Bazaar repo to SVN
- git svn clone failed due to Svndiff backward-sliding source view
- Will TortoiseSVN 1.7 work properly against a SVN 1.6 repository?
When I checkout the SVN second repository, I’ve the full history, including before the copy. However when I git-svn the second repository, I don’t have the old history (from release_1, …). The first commit is the copy of
Here is what I tried:
- git svn clone –no-minimize-url –authors-file my-authors-file svn+ssh://svn.mycompany.com/project/release_N/trunk my_project.git
Since this does not work, I tried something else. Let’s assume that the ‘copy commit’ is K, I tried:
- git svn clone –no-minimize-url -r BASE:K –authors-file my-authors-file svn+ssh://svn.mycompany.com/project/release_N/trunk my_project.git
This time git-svn does not find any commit.
Do you know if there is a magic trick to have the full history ?
One Solution collect form web for “From svn to git, with a moved trunk”
This is what I’ve understood by the question:
You have your history spread across several svn branches (which happen to all be called trunk).
You would like all of this history when moving to git.
I think the following will fix your problem:
git svn init my_project.git git config svn-remote.svn.url svn+ssh://svn.mycompany.com/project git config svn-remote.svn.fetch release_N/trunk:refs/remotes/trunk git config svn-remote.svn.branches */trunk:refs/remotes/* git config svn.authorsfile my-authors-file git svn fetch
This will create the release_N branch as trunk, and the remaining releases as different branches in your git repository.
As far as I know, you can’t get one git svn branch to point at multiple urls, which is what I think you were trying to do.