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

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

问题描述

我有一个跟踪 svn 存储库的 git 存储库.我使用 --stdlayout 克隆了它.

我通过 git checkout -b foobar

创建了一个新的本地分支

现在我希望这个分支在 svn 存储库中的 .../branches/foobar 结束.

我该怎么做?

(剪掉了大量调查性文字.如果您关心,请查看问题历史)

解决方案

从 git v1.6.1 开始,git svn branch 可用.

来自 git 文档:

<前>分支在 SVN 存储库中创建一个分支.-m, --message允许指定提交消息.-t, --tag使用 tags_subdir 而不是 branch_subdir 创建标签在 git svn init 期间指定.

以前版本的 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天全站免登陆