添加一个新的Subversion远程到现有的Git仓库 [英] Add a new subversion remote into existing Git repository

查看:91
本文介绍了添加一个新的Subversion远程到现有的Git仓库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个完全跟踪远程SVN回购的git存储库。现在我需要添加一个新的分支,它将跟踪一个完全不同的SVN仓库中的目录。

I have a git repository fully tracking a remote SVN repo. Now I need to add a new branch that will be tracking a directory in a completely different SVN repo.

这可能吗?

Is that possible?

推荐答案

它是。 git svn init 仅编辑默认的svn remote,您必须编辑配置文件。

It is. git svn init only edits the default svn remote, you'll have to edit the config file.

.git / config ,复制并修改现有的svn-remote部分,然后运行 git svn fetch 。例如:

Look in .git/config, copy and alter the existing svn-remote section, and run git svn fetch. For example:

[svn-remote "svn2"]
        url = http://bzzz.googlecode.com/svn
        fetch = trunk:refs/remotes/svn2/trunk
        branches = branches/*:refs/remotes/svn2/*
        tags = tags/*:refs/remotes/svn2/tags/*

这篇关于添加一个新的Subversion远程到现有的Git仓库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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