在本地计算机临时上与SVN脱机工作 [英] Working offline with SVN on local machine temporary

查看:255
本文介绍了在本地计算机临时上与SVN脱机工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在研究一个当前在SVN上的项目.但是,我将在几天之内无法访问互联网,并将继续从事我的项目.

I am working on a project currently on SVN. I however will not have access to the internet for a few days, and will be working on my project.

有什么方法可以在本地计算机上克隆存储库,提交更改,然后在访问Internet时将其推送"到共享存储库中?考虑到这里的水银,是否值得完全迁移?!

Is there any way to make a clone of the repository on my local machine, commit changes to it, and when I gain access to the internet "push" them onto the shared repository? Thinking in terms of Mercurial here, is it worth migrating completely?!

推荐答案

您的问题听起来像

Your problem sounds to me like the use case for git-svn:

  • 设置您的Git存储库:git svn clone http://svn.example.com/project/trunk
  • 在线时,将更改提交到SVN
  • 离线之前,请执行git svn rebase来使您的Git存储库与SVN存储库同步
  • 离线时,使用git commit
  • 提交到Git存储库
  • 再次恢复在线时,请执行git svn dcommit将所做的更改推回到SVN存储库中
  • set up your Git repo: git svn clone http://svn.example.com/project/trunk
  • while being online, commit your changes to SVN
  • before going offline, do a git svn rebase to get your Git repo in sync with the SVN repo
  • while being offline, commit to the Git repo using git commit
  • when getting back online again, do a git svn dcommit to push your changes back to the SVN repo

我每天都在使用此工作流程!

I'm using this workflow daily!

这样做有两个巨大的优势:

You get two huge advantages doing so:

  • 您的完整SVN历史记录将备份到Git存储库中,并从该克隆中复制的每个Git存储库中备份
  • 离线时,您可以查看提交消息,签出其他分支等.

这篇关于在本地计算机临时上与SVN脱机工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆