I have a following problem - I'm working on a Git repository that's based on a SVN repository. I used git svn clone path-to-repo
command to clone the SVN repository so my Git one retains the same history and has a common base. After cloning, I added a Git remote repository using git remote add origin path-to-my-git-repo
. Then, I applied some more commits and pushed it to Git repository only (so, obviously they don't have git-svn-id
like the commits cloned from SVN). SVN repository won't be updated at once every time I make changes (instead, it will be updated every given period of time), but I have to keep it connected to my project, so I can rebase my Git repository with changes other people commit to SVN repository only.
Everything looked great, I cloned the SVN repo, added a Git remote one, I was able to make changes, rebase and when I need, I could push changes to Git or SVN repository.
The problem is, I need the project cloned on several locations. When I clone the Git one (git clone path-to-repo target-directory
) and add a SVN remote repository using git svn init path-to-svn-repo --trunk="/"
command, I can't rebase my project with new changes in SVN repository. It seems to be connecting, because it asks for username and password, but gives an “Unable to determine upstream SVN information from working tree history” error. By the way, --trunk="./"
is not a mistake here - SVN repository doesn't follow a convention of having branches, tags and trunk, instead the code is directly in the base directory (or at least it looks like this after seeing it cloned using git svn clone
- files are directly in the target directory).
Cloning SVN repository to make it work and adding commits from Git one manually every time I clone the project is not an option.
What am I doing wrong here? I'd appreciate any help or hints.