# How to convert SVN tags to git tags?

2 messages from 2019-01-18 to 2019-01-18. Participants: Steve Keller, Eric Wong.
Thread: https://gitlist.dev/t/50260

## Steve Keller, 2019-01-18 12:50

Subject: How to convert SVN tags to git tags?
Message-ID: <trinity-9f702373-ab1b-4c3e-9418-894ab0a6ef5a-1547815808777@3c-app-gmx-bs22>
URL: https://gitlist.dev/e/trinity-9f702373-ab1b-4c3e-9418-894ab0a6ef5a-1547815808777%403c-app-gmx-bs22

```
After converting from SVN to git using git svn init + git svn fetch,
my SVN tags appear as remote branches in git.  I find many suggestions
to convert these to git tags by calling git tag -a <tag-name> <branch-name>
but this gives something like this

               C4
               |
               V
    T -> C3 -> C2
               |
               V
               C1

that is, I still have a branch with only 1 commit C3 and I have a tag T
pointing to that commit.  Also, T will have a current timestamp.  I'd
prefer to get

               C4
               |
               V
          T -> C2
               |
               V
               C1

where T takes the commit message and date from C3.  How can I achieve
that?

Steve

```

## Eric Wong, 2019-01-18 22:31

Subject: Re: How to convert SVN tags to git tags?
Message-ID: <20190118223147.bcmyh4g7rxancgii@dcvr>
URL: https://gitlist.dev/e/20190118223147.bcmyh4g7rxancgii%40dcvr
In-Reply-To: <trinity-9f702373-ab1b-4c3e-9418-894ab0a6ef5a-1547815808777@3c-app-gmx-bs22>

```
Steve Keller <keller.steve@gmx.de> wrote:
> After converting from SVN to git using git svn init + git svn fetch,
> my SVN tags appear as remote branches in git.  I find many suggestions
> to convert these to git tags by calling git tag -a <tag-name> <branch-name>
> but this gives something like this

Hi Steve, instead of an annotated tag ("-a"), you can use a
lightweight tag by omitting the "-a".

Fwiw, I chose to map SVN "tags" to remote branches in git since
some projects I followed back in the day had moving tags in SVN.

```
