【问题标题】:Move SVN repository to Bitbucket将 SVN 存储库移至 Bitbucket
【发布时间】:2018-07-25 09:06:15
【问题描述】:

一步一步介绍如何将 SVN 存储库移动到 Linux 上的 Bitbucket。

我在 SVN 中有一些存储库,我想迁移到 Bitbucket,如果有人知道如何通过 linux 命令执行此操作,我将不胜感激,因此我可以将其转换为脚本。

非常感谢!

【问题讨论】:

  • Bitbucket 托管 git 和 Mercurial 存储库,因此您必须决定是使用 git 还是 hg。为什么会有“github”标签?
  • 那么你想将一个 svn repo 迁移到 git repo,然后 psh git repo 到 bitbucket?
  • @MarinaLiu-MSFT 是的,非常感谢您的帮助
  • @MikeShobes 我添加了将svn repo迁移到git的方法,你可以试试。
  • @MarinaLiu-MSFT 非常感谢!!我可以改用“svn checkout”吗?

标签: git svn version-control bitbucket


【解决方案1】:

您可以使用git svn clone 命令将svn repo 迁移到git repo。详细步骤如下:

git svn clone <URL for svn repo>
# besides you can use --trunk, --branches and --tags etc for git svn clone command
# may be asked to enter SVN credentials

# after first creating the repo in bitbucket...
cd reponame
git remote add origin <bitbucket repo URL>
# you may also need to "git pull --allow-unrelated-histories" to merge you new local branch with the remote
# you may need to do a "git branch --set-upstream-to=origin/master"
# you may also need to another "git pull --allow-unrelated-histories" to merge you new local branch with the remote
git push origin --all

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-12-09
    • 2017-03-10
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多