git-svn创建分支过去的修订 [英] git-svn create branch off past revision

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

问题描述

我知道如何创建一个svn分支w / git 。但是,我可以从过去的修订/提交做到吗?

git-svn,但它的工作原理:

  svn copy https://foo.com/svn/bar/trunk/@6635 https://foo.com/svn/bar/branches/mybranch -m'创建分支'
#在你的git工作目录中
git svn fetch
git branch -a

您应该在该列表中看到 remotes / mybranch 创建一个跟踪该远程的本地分支

  git checkout -b local_mybranch remotes / mybranch 


I know how to create an svn branch w/git. But, can I do that off of a past revision/commit ?

解决方案

Answer for myself (and anyone else) - not strictly git-svn, but it works:

svn copy https://foo.com/svn/bar/trunk/@6635 https://foo.com/svn/bar/branches/mybranch -m 'creating a branch'
# in your git working directory
git svn fetch
git branch -a

You should see remotes/mybranch in that list, now create a local branch that tracks that remote

git checkout -b local_mybranch remotes/mybranch

这篇关于git-svn创建分支过去的修订的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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