git-svn cannot create a branch to follow SVN branching
Posted
by
Serhiy Yakovyn
on Stack Overflow
See other posts from Stack Overflow
or by Serhiy Yakovyn
Published on 2011-01-09T11:33:22Z
Indexed on
2011/01/10
8:53 UTC
Read the original article
Hit count: 287
Hello everybody,
I'm struggling with the following issue. When I continue fetching revisions from SVN with
git svn fetch
I'm getting the following error (removed https to be able to post question):
*Found possible branch point: somecompany.com/product/trunk => somecompany.com/product/branches/deep/branches/product-001, 72666 Found branch parent: (refs/remotes/deep/branches/product-001) b685b7b92813885fdf 6b8e2663daf884bf504b14 Following parent with do_switch Successfully followed parent error: 'refs/remotes/deep' exists; cannot create 'refs/remotes/deep/branches/product-001' fatal: Cannot lock the ref 'refs/remotes/deep/branches/product-001'. update-ref -m r72667 refs/remotes/deep/branches/product-001 df51920e8f0a53f26507 c2679eb6a9dbad91e0d6: command returned error: 128*
This happened because I was fetching revisions using the default filter for SVN branches:
[svn-remote "svn"]
url = https://somecompany.com/someproduct
fetch = trunk:refs/remotes/trunk
branches = branches/*:refs/remotes/*
tags = tags/*:refs/remotes/tags/*
Now, I have the line below added, but it's too late:
branches = branches/deep/branches/*:refs/remotes/deep/branches/*
I have tried to fix this by using git reset to remove all the commits. Actually I can see from the error message that git is trying right thing, but cannot because of the branch remotes/deep being existing.
I have tried to search for 2 possible solutions: 1. Remove that branch (remotes/deep), but as it is tracked by git as a remote, I was not able to find any solution for that. 2. Remove the whole history related to that branch. No success too :(
Does anybody know how to deal with my issue?
Thank you in advance, Serhiy Y
© Stack Overflow or respective owner