git-svn:我如何通过git创建一个新的svn分支? [英] git-svn: how do I create a new svn branch via git?

查看:263
本文介绍了git-svn:我如何通过git创建一个新的svn分支?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个跟踪svn仓库的git仓库。我使用 - stdlayout 。克隆它。



我通过 git创建了一个新的本地分支checkout -b foobar



现在我想要这个分支以 ... / branches / foobar

我怎么去做这件事?



(大量调查如果您关心,请参阅问题历史记录)

解决方案

自git v1.6.1开始, git svn branch



来自git文档:

 
分支
在SVN仓库中创建一个分支。

-m,--message
允许指定提交消息。

-t,--tag
使用tags_subdir而不是在git svn init中指定的branches_subdir
创建一个标记。

以前版本的git不提供创建svn分支的方法。


I have a git repository which tracks an svn repository. I cloned it using --stdlayout.

I created a new local branch via git checkout -b foobar

Now I want this branch to end up in …/branches/foobar in the svn repository.

How do I go about that?

(snipped lots of investigative text. see question history if you care)

解决方案

as of git v1.6.1, git svn branch is available.

From the git docs:

    branch
        Create a branch in the SVN repository.

        -m, --message
            Allows to specify the commit message.

        -t, --tag
            Create a tag by using the tags_subdir instead of the branches_subdir
            specified during git svn init.

Previous versions of git do not provide a way to create an svn branch.

这篇关于git-svn:我如何通过git创建一个新的svn分支?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆