Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to "git svn dcommit" from a cloned git-svn repository :

Tags:

git

git-svn

Is there a way to "git svn dcommit" from a cloned git-svn repository :

I have several branches in my svn, sometimes it is very small branch and it is nice to have it in the same directory, but sometimes these branches grow big and it is nice to move the whole thing to another folder.

But when I do a git clone from this local repository to another place on my disk git-svn lost all its information and I don't known how to connect it back. I suppose I could just make a copy of the folder, but doing it through git would be nicer.

like image 662
Emmanuel Caradec Avatar asked Apr 09 '09 13:04

Emmanuel Caradec


3 Answers

Once you've cloned a git-svn repo, you can pull in the information you need by running git svn init with the same parameters as the original repo was created with. According to the WebKit git-svn instructions, the trick is to use update-ref to get yourself to a state where you can fast-forward to the tip of the SVN tree:

git svn init -T trunk http://svn.webkit.org/repository/webkit
git update-ref refs/remotes/trunk origin/master

The exact parameters passed to git svn init depend on the setup of your Subversion repo and git-svn clone.

like image 153
Brian Campbell Avatar answered Nov 11 '22 01:11

Brian Campbell


Unfortunately not, as git-clone does not clone the git-svn information when performing a clone. You can read more about the situation here.

like image 21
mipadi Avatar answered Nov 11 '22 00:11

mipadi


It is possible, but you have to set things up a bit differently. Here is how we do it on numpy - the repo was created with git-svn-automirror

You can look at the function _git_update_mirror to see how to do it manually

like image 29
David Cournapeau Avatar answered Nov 11 '22 01:11

David Cournapeau