Git - 在git-svn clone后删除远程分支 [英] Git - Remove remote branches after git-svn clone

查看:177
本文介绍了Git - 在git-svn clone后删除远程分支的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用命令 git svn clone ... --trunk = trunk --tags = tags --branches = branches 来克隆SVN回购。



该操作已正确执行,现在,当我列出分支时,我有以下所有标签:

  $ git branch -a 
* master
remotes / tags / 1.0
remotes / tags / 2.0

我可以轻松地检出分支并创建真正的git标签,但是如何删除远程分支 remotes / tags / 1.0 当我完成了吗?

解决方案

另一个选择是尝试导入svn repo与< a href =https://github.com/nirvdrum/svn2git =nofollow noreferrer> ruby​​ script svn2git :



是一个小工具,用于将项目从Subversion迁移到Git,同时保持干线,分支和标签的位置。


这意味着'svn b ranches'标签将是git仓库中的实际git标签。



你可能需要在导入后更改作者

I have cloned a SVN repo with the command git svn clone ... --trunk=trunk --tags=tags --branches=branches.

The operation have been correctly executed, and now when I list my branches I have all the past tags such as :

$ git branch -a
* master
  remotes/tags/1.0
  remotes/tags/2.0

I can easily checkout the branches and creates real git tags, but how can I remove the remote branch remotes/tags/1.0 when I'm done?

解决方案

Another option would be to try and import the svn repo with the ruby script svn2git:

svn2git is a tiny utility for migrating projects from Subversion to Git while keeping the trunk, branches and tags where they should be.

That means the 'svn branches' tags would be actual git tags in the git repo.

(you might have to change the authors after import)

这篇关于Git - 在git-svn clone后删除远程分支的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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