You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

使用git svn从SVN迁移至Git后,无法更新Git仓库问题

使用git-svn从SVN迁移Git后无法推送新变更

问题详情

我通过git-svn插件将SVN仓库迁移至Git,已成功克隆包含完整历史记录的SVN仓库并推送到GitLab的main分支。执行git svn fetch可以获取SVN仓库的新变更,git log --all也能显示这些新增的修订记录,但无论执行什么操作,都无法将这些新变更推送到Git仓库。

当前分支信息(仅需迁移trunk,无需处理其他标签或分支)

~/GitMigration/Blah-Main $ git branch
* main
~/GitMigration/Blah-Main $ git branch -r
  origin/main
  origin/trunk

尝试过的无效操作

最初推送至Git仓库main分支时,使用-f参数可以成功,但现在该命令也失效了:

~/GitMigration/Blah-Main $ git branch -a
* main
  remotes/origin/main
  remotes/origin/trunk
~/GitMigration/Blah-Main $

~/GitMigration/Org-Main $ git push origin main
Everything up-to-date

仓库配置信息

svn-remote.svn.url=https://svn.com/Org/svn
svn-remote.svn.fetch=Org/trunk:refs/remotes/origin/trunk
svn-remote.svn.branches=Org/branches/*:refs/remotes/origin/*
svn-remote.svn.tags=Org/tags/*:refs/remotes/origin/tags/*
svn.authorsfile=/Users/user/GitMigration/authors.txt
remote.origin.url=https://gitlab.com/org/org-main.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
branch.main.remote=origin
branch.main.merge=refs/heads/main

内容的提问来源于stack exchange,提问作者Gandalf

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.20 22:15:01