Git-svn:创建&推一个新的分支/标签? [英] Git-svn: create & push a new branch/tag?
问题描述
使用git-svn克隆一个SVN仓库并使用 -s
选项( git svn clone http:// server / repo -s
),当 dcommit
ing
如果我要用git在本地创建一个 foobar
分支( git checkout -b foobar
),我该如何让git -svn 创建服务器上的分支( http:// server / repo / branches / foobar
)?
我正在使用Git 1.5.5.6。
$ b
请注意: 接受的方法不适用于Git 1.5.5.6 ,因为没有 After cloning an SVN repository using git-svn with the For instance; if I were to use git to create a I'm using Git 1.5.5.6. Please Note: The accepted method below does not work with Git 1.5.5.6 as there is no You can read all the nitty-gritty details in this tutorial, but the gist is basically the following:
这篇关于Git-svn:创建&推一个新的分支/标签?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋! git svn branch
方法。我仍然在寻找一个解决方案,它不涉及解决直接使用svn的问题。 你可以阅读所有这些教程中的基本细节,但要点基本上如下:
$ b $ pre $ $ $ $ $ git svn branch -m主题分支my_topic#创建名为my_topic的SVN分支
$ git checkout --track -b my-topic remotes / my_topic#为my_topic创建Git分支
#破解hack hack ...
$ git svn dcommit --dry-run#确保你提交的是正确的SVN分支
$ git svn dcommit#将更改提交到SVN中的my_topic分支
-s
option (git svn clone http://server/repo -s
), how does one create a branch or tag and have pushed to the relevant branch/tag directory in the repository when dcommit
ing?foobar
branch locally (git checkout -b foobar
) how can I have git-svn create the branch on the server (http://server/repo/branches/foobar
)?
git svn branch
method. I'm still looking for a solution to this that doesn't involve resolving to working with svn directly.$ git svn branch -m "Topic branch" my_topic # Create SVN branch called "my_topic"
$ git checkout --track -b my-topic remotes/my_topic # Create the Git branch for "my_topic"
# Hack hack hack...
$ git svn dcommit --dry-run # Make sure you're committing to the right SVN branch
$ git svn dcommit # Commit changes to "my_topic" branch in SVN