Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using git-svn, how do I dcommit tags?

I was using Git to retain a history of my project locally. I was later asked to commit the entire git project into a remote, empty svn project folder (the usual trunk, tags, branches structure, in that case and spelling). I was able to commit to the trunk perfectly fine, but none of the tags seemed to have been dcommitted. Is there a way to commit tags, preferably through a single command?

P.S. I am using TortoiseGit, but command line is fine, too.

like image 353
Japtar Avatar asked Oct 04 '11 03:10

Japtar


People also ask

How do I tag a folder in SVN?

Select the folder in your working copy which you want to copy to a branch or tag, then select the command TortoiseSVN → Branch/Tag.... If you can't remember the naming convention you used last time, click the button on the right to open the repository browser so you can view the existing repository structure.

What is tagging in SVN?

A tag is just a “snapshot” of a project in time. In Subversion, this idea already seems to be everywhere. Each repository revision is exactly that—a snapshot of the filesystem after each commit. However, people often want to give more human-friendly names to tags, such as release-1.0 .

Can I use Git and SVN at the same time?

No interaction between them. Just ignore the . git folder for SVN and the . svn folder for Git and you should be fine.

What is the difference between tag and branch in SVN?

There is no difference between branches and tags in Subversion. The only difference is in what the user then does with the directory. Branches are typically created, edited, and then merged back into the trunk. Alternatively, tags are created as a snapshot of the project at a point in time and then never changed.


Video Answer


1 Answers

Git and SVN treat tags differently. Tags are a powerful feature in Git, but just a folder in SVN, much like how branches are.

So to create tags in SVN from git-svn, you have to create a branch (tag) in git-svn repo. Git tags will not be "dcommitted"

You can use git svn branch --tag or its shorthand git svn tag to create tags and then dcommit them.

Related question with detailed answer: Git-svn: create & push a new branch/tag?

like image 182
manojlds Avatar answered Oct 21 '22 03:10

manojlds