git-svn: re-link git-svn cloned repo to svn
I have on my gitlab a git repo which was originally cloned using
git svn clone https://svn.url.com/project/trunk. I used to
dcommit to the svn as well as
git push to the gitlab from my local copy. But now I have now lost the original local copy where I do the git-svn clone from.. I do
git clone from my gitlab but now I lost the capability to fetch from the svn and dcommit again.. Is there any way I can restore it? I’ve never back up the .git/svn folder under the git directory… 🙁
- Is it possible to do a “destroy history” in TFS?
- Can I ignore build folder from master branch? - Yeoman Deployments using Git Subtree
- MS Access Front-end: Does each user need their own copy?
- Re-establish TFS source control bindings
- Git - pulling changes from clone back onto the master
- Code base maintenance across multiple PCs and setups
One Solution collect form web for “git-svn: re-link git-svn cloned repo to svn”
It is easy.
Open up your git config (under
and add the following to the end
[svn-remote "svn"] url = https://svn.url.com/ fetch = :refs/remotes/git-svn
you can then git-fetch to relink all your git-svn revisions
P.S: if it takes too long and/or your revisions are too many, you can directly move your refs/remotes/git-svn to the last known svn-revision before doing the git-fetch
git update-ref refs/remotes/git-svn refs/heads/master