简体   繁体   English

使用git-svn,如何重命名标签?

[英]Using git-svn, how do I dcommit tags?

I was using Git to retain a history of my project locally. 我正在使用Git在本地保留我的项目历史。 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). 后来我被要求将整个git项目提交到一个远程的空svn项目文件夹(通常的主干,标签,分支结构,在这种情况下和拼写)。 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? 有没有办法提交标签,最好是通过一个命令?

PS I am using TortoiseGit, but command line is fine, too. PS我正在使用TortoiseGit,但命令行也很好。

Git and SVN treat tags differently. Git和SVN对标签的处理方式不同。 Tags are a powerful feature in Git, but just a folder in SVN, much like how branches are. 标签是Git中的一个强大功能,但只是SVN中的一个文件夹,就像分支机构一样。

So to create tags in SVN from git-svn, you have to create a branch (tag) in git-svn repo. 因此,要从git-svn在SVN中创建标记,您必须在git-svn repo中创建一个分支(标记)。 Git tags will not be "dcommitted" Git标签不会被“dcommitted”

You can use git svn branch --tag or its shorthand git svn tag to create tags and then dcommit them. 你可以使用git svn branch --tag或它的简写git svn tag来创建标签,然后再提交它们。

Related question with detailed answer: Git-svn: create & push a new branch/tag? 相关问题详细解答: Git-svn:创建并推送新的分支/标签?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM