Migrating from svn to git: tags get a@with a number at the end of the tag. What can it be?

Asked

Viewed 59 times

3

I have a question. I cloned the project with git svn clone. I used the git remote add +url to add the remote repository. When I am doing the git push --tags git tags are going in a different format than svn. For example:

  • In the SVN: tag_all_1.0.0.
  • In GIT (migrated): tag_all_1.0.0@431

Does anyone know what this could be?

  • Hi. In my project I used the subgit link and did not face this difficulty, all tags were migrated correctly. Worth the test?

1 answer

0

I believe that the explanation for this occur with tags be the same with branches: Git Svn was unable to find a "parent" commit for the first commit of the SVN branch so that it can connect the branch to the history of the other branches.

This is because SVN allows a branch to be created from any directory that is not necessarily a branch (or trunk) within SVN. For example, copying the directory /trunk/foo for /branches/bar instead of copying from the /trunk will give rise to this branch.

The format in which it creates the branch (or tag) is:

<branchname>@<SVN-Revisão>

Now, explaining the origin of this revision and why Git makes this decision is more complicated. I confess that I read and did not understand very well and, not to simply translate what is said there, I leave the link to read the explanation of the documentation. I believe this already helps, as it is not so simple to search for information on this problem in Google :).

This happens with tag also because in SVN there is not much difference between branch and tag: both are created by copying directories. Git Svn then reflects the same behavior for both.

How to avoid this situation

In cloning the repository, this branch/tag creation with the arroba sign (@) can be avoided with the parameter --no-follow-branches.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.