如何让git-svn使用特定的svn分支作为远程存储库? [英] How do I make git-svn use a particular svn branch as the remote repository?

查看:332
本文介绍了如何让git-svn使用特定的svn分支作为远程存储库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

警告:一般来说,我是一个n00b到 git 。我的团队在 svn 中使用了功能分支,并且我希望使用 git-svn 来跟踪我在特殊功能分支。我一直(大致)遵循 Andy Delcambre的帖子设置我的本地 git 回购,但这些说明似乎已导致 git 选取 svn 最近作为远程仓库发生了变化的分支;问题是这不是我关心的分支。我如何控制哪个分支 git-svn 使用?或者我接近完全错误?

更新:我确实使用了 -T -b -t 选项(在我的情况下,因为 svn 多个项目,但我希望 git 回购仅包含我正在处理的项目)。 解决方案

Muchas gracias to Bart's Blog for this handy 参考git中的svn分支。显然,我所需要的只是在创建 git 分支时指定远程分支,例如

  git checkout -b git-topic-branch-foo foo 

其中 foo 是远程分支的名称。


A word of warning: I'm a n00b to git in general. My team uses feature branches in svn, and I'd like to use git-svn to track my work on a particular feature branch. I've been (roughly) following Andy Delcambre's post to set up my local git repo, but those instructions seem to have led git to pick the svn branch that had changed most recently as the remote repository; the problem is that's not the branch I care about. How do I control which branch git-svn uses? Or am I approaching this completely wrong?

UPDATE: I did use the -T, -b, and -t options (in my case because the svn repo has multiple projects, but I want the git repo to contain only the project I'm working on).

解决方案

Muchas gracias to Bart's Blog for this handy reference for svn branches in git. Apparently all I needed was to specify a remote branch when creating the git branch, e.g.,

git checkout -b git-topic-branch-foo foo

where foo is the name of the remote branch.

这篇关于如何让git-svn使用特定的svn分支作为远程存储库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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