Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Working offline with SVN on local machine temporary

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.

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?!

like image 396
Karan Avatar asked Feb 08 '11 14:02

Karan


People also ask

Can you work offline with SVN?

your complete SVN history is backed up in the Git repo and in every Git repo that gets cloned from that one. while being offline, you can view the commit messages, checkout other branches, etc.

How do I access local SVN repository?

You can either store your repositories locally and access them using the file:// protocol or you can place them on a server and access them with the http:// or svn:// protocols. The two server protocols can also be encrypted. You use https:// or svn+ssh:// , or you can use svn:// with SASL.

How do I setup a local SVN server?

To set up SVN, download and run the VisualSVN Server installer on the server you want to use, then follow the wizard to complete the installation. You can download the VisualSVN Server installer from visualsvn.com. VisualSVN Server provides an installation getting started guide.

Does SVN have a local repository?

This page describes how to set up a local Subversion (SVN) repository using TortoiseSVN, a free Subversion client for Windows. It's difficult to share changes and keep backups with a local repository, so we don't recommend it as a long-term solution.


1 Answers

Your problem sounds to me like the use case for git-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:

  • your complete SVN history is backed up in the Git repo and in every Git repo that gets cloned from that one
  • while being offline, you can view the commit messages, checkout other branches, etc.
like image 185
eckes Avatar answered Sep 20 '22 20:09

eckes