本文介绍了如何删除git中的subversion remote?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个最初使用git-svn创建的git存储库。现在我有一个git服务器,我推送到svn仓库已经丢失。我可以取出svn遥控器吗?如何?

解决方案删除与要删除的远程相关的部分。



您要删除的行可能大致如下所示:

  [svn-remotesvn] 
url = svn-repository / trunk
fetch =:refs / remotes / git-svn

这将从Git中移除远程,但您仍然会在Git提交和SVN提交保存在 .git / svn 中。如果你想摆脱所有的SVN遥控器,你可以删除整个目录。如果你想摆脱一个SVN遥控器并保留其他人,你需要查看目录结构,并且只删除与你正在移除的遥控器相关的遥控器。


I have a git repository that was originally created using git-svn. Now I have a git server that I push to and the svn repository has been lost. Can I remove the svn remote? How?

解决方案

You can edit the .git/config file and remove the section associated with the remote you want to remove.

The lines you want to remove probably look roughly like this:

[svn-remote "svn"]
    url = url-of-svn-repository/trunk
    fetch = :refs/remotes/git-svn

This will remove the remote from Git, but you will still have the relationship between the Git commits and the SVN commits stored in .git/svn. You can remove this whole directory if you want to get rid of all your SVN remotes. If you want to get rid of just one SVN remote and keep others, you will need to look at the directory structure and only remove the ones associated with the remote you are removing.

这篇关于如何删除git中的subversion remote?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-04 20:49