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

Question:

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

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

Does anyone know what this can be?

Answer:

I believe the explanation for this happening with tags is the same as with branches: Git Svn was not able to find a "parent" commit for the first commit of the SVN branch so it can link the branch with 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 /trunk/foo directory to /branches/bar instead of copying from /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 review and why Git makes this decision is more complicated . I confess that I read it and I didn't understand it very well and, in order not to simply translate what is said there, I leave the link to read the documentation explanation. I believe this helps, as it is not so simple to search for information about this problem on Google :).

This happens with tag too 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 repository cloning, this branch/tag creation with the at sign ( @ ) can be avoided with the --no-follow-branches parameter.

Scroll to Top