Git: unable to determine SVN information upstream from the HEAD history

I have successfully used git-svn to connect to my svn trunk for some time. First I set up my repo by doing this:

git svn clone -s http://domain.com/svn/name-of-repo 

I had this setting for quite some time (maybe about a year) and I had no problems, most likely because all I do is the local git branch, which I eventually merge back into my master branch and return back to the svn trunk.

Recently, I needed to start making some changes in another branch in the same svn repository, http://domain.com/svn/name-of-repo/branches/demo .

I was able to extract from this branch once by editing the .git / config file and adding the following lines:

 [svn-remote "svndemo"] url = http://domain.com/svn/name-of-repo/branches/demo commiturl = http://domain.com/svn/name-of-repo/branches/demo fetch = :refs/remotes/git-svn-demo 

Then I ran the following command to grab a demo branch starting from version 4034:

 git svn fetch svndemo -r 4034 

So now I have a new remote branch called remotes / git -svn-demo. From this, I created a function branch:

 git checkout -b svndemo-local remotes/git-svn-demo 

What was missing was what I needed, so I made the changes that I had to make, tied to my local branch, then tried to run "git svn fetch & git svn rebase". Both returned errors:

Unable to determine SVN information up tree history

And this is where I am stuck. I looked at SO and other sites (Google), but did not find a solution other than “git-svn clone repo again and start from scratch”, which is not ideal.

I looked at my .git / svn / refs / remotes / git-svn-demo / unhandled.log and compared it to my .git / svn / refs / remotes / trunk / unhandled.log and they have nothing significant.

I also looked at the commit message that came down from the initial fetch of this remote branch, and it includes the git-svn-id information.

blah blah blah, this is a message of commission, blah blah blah

git -svn-id: http://domain.com/svn/name-of-repo/branches/ demo@4034 e6edf6fb-f266-4316-afb4-e53d95876a76

I would like to hear a fresh idea about this.

+4
source share
1 answer

To access svn branches you do not need to add a new svn remote. When you created your git svn clone using the -s (standard) git option, all branches defined under the branches were also tracked.

You should be able to see these branches with git branch -r (in this case, a branch demonstration).

If you check this, you can work in it and svn dcommit to it.

I'm not sure if changing svn-remote messed up your repository or not, but if I were you, I would assume that he did this and start with your original clone command.

+1
source

All Articles