1

I am working with a SVN server using git SVN. I struggled to created a tag so I had a look at the tree. I noticed that my tree is messed up: all commits appear twice. Once in the red "branch" and once in the purple on:

enter image description here

Before posting this I cleaned a lot of branches using:

git branch -D useless_remote_branch
git gc

But for this one I don't know what to do to get a clean history.

How could I get back to a linear history with only the red "branch"?

I can delete the tag on the SVN side if needed.

Thank you!


EDIT

Here is what I got after the solution suggested by @VonC and a git svn tag command:

enter image description here

Community
  • 1
  • 1
Plouff
  • 3,290
  • 2
  • 27
  • 45

1 Answers1

1

If you are sure you have properly deleted the purple branch (both on git and svn), make sure you delete the tag as well (both on git and svn)

svn rm $URL/tags/the_tag
git branch -D -r tags/the_tag
rm -rf .git/svn/tags/the_tag

That way, none of the commits from the purple branch won't be referenced by any commit from the red branch.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Thank you for your suggestion. I think I tried that earlier but it failed (I tried so many things I don't remember them all!). Now it works! I probably did something wrong when tagging for SVN... Thanks again :) – Plouff Mar 22 '16 at 16:26