问题描述
我有一个最初使用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?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!