visual-studio - 如何创建远程 svn 存储库的本地副本?

标签 visual-studio svn visualsvn

我有远程 svn 存储库。我想 check out 它(带有历史记录),然后在 Visual Studio 中用作常规存储库。一段时间后,我将从本地存储库提交(提交更改)到远程存储库(如果有的话,还会更新文件)。

所以看起来我只需要两个 svn 存储库的副本,我需要能够同步它们。

怎么做?

最佳答案

这与 SVN 背道而驰。听起来您想要的是像 Git 或 Mercurial 这样的 DVCS,因此为什么许多开发人员已经转向这样的东西。

我会使用 git;并使用 git-svn桥接器能够与您的 SVN 服务器通信。

当您从 SVN 克隆时,Git 会保留存储库的完整副本(这意味着初始克隆可能需要很长时间,因为它需要 check out 每个修订版)。然后,您将在本地提交到您的 Git 存储库;和 dcommit(推送)回您的 SVN 存储库。

我不知道单独使用 SVN 有什么干净的方法可以做到这一点。典型的工作流程可能是:

git svn clone http://yoursvnserver/svn --username vcsjones

#make some changes
git add -A
#stage your changes. add -A stages all changes;
#you can stage individial files too or use git add -i for interactive adding
git commit -m "My commit messages"

#repeat makes changes and commit as many times as you want
git svn dcommit
#commit all local commits back to the SVN repository.

如果您是单人商店;将您的存储库保存在 USB 闪存驱动器上(并确保以某种方式对其进行备份,以防丢失;它会出现故障)。

关于visual-studio - 如何创建远程 svn 存储库的本地副本?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8933015/

相关文章:

asp.net - 在 Visual Studio 中使用查询字符串参数进行调试

spring - 将 SVN 添加到 Spring Tool Suite,Subclipse 扩展不可用

jenkins - 在声明性 Jenkins 管道中获取 SVN 修订版

linux - Linux 服务器的 SVN 存储库管理是否有任何 GUI 工具?

visual-studio - 如何在 Visual Studio 中使自动换行尊重缩进?

git - VSTS 取消保护 git 分支

asp.net - 为什么 html table td 无法从目录中找到图像?

svn - 追溯更改 SVN 提交消息?

svn - 如何在 win7 64bit 中设置 VisualSVN 提交后 Hook

svn - 有没有办法将带有 HISTORY 的 SourceSafe 迁移到 SVN?