1

I have two networks that are not connected. I can only use an USB stick to transfer data from one to the other.

On the first network there is a subversion control system. So I can checkout a working copy on computers on that network and also to an connected usb stick.

Also I can use git svn commands to create a git repository from subversion on the USB stick.

On the second network I can insert the usb stick on the first computer. But how to copy/push/pop the git repository from the usb stick to the first and the second computer on the second network and back to the usb stick ?

     PC A.1               PC A.2                                  PC B.1               PC B.2
   +--------+           +--------+                              +--------+           +--------+
   | SVN    |  Netw. A  | SVN    |                              |        |  Netw. B  |        |
   | Repos. |-----------| Working|===USB-Stick      USB-Stick===|  git ? |-----------| git ?  |
   | Server |           | Copy   |    git svn        git svn    |        |           |        |
   +--------+           +--------+       or            or       +--------+           +--------+
                                      svn wc         svn wc
Sander de Jong
  • 351
  • 6
  • 18
ebart
  • 59
  • 7
  • 1
    This entire workflow sounds needlessly painful. – PeeHaa Nov 27 '16 at 10:24
  • Possible duplicate of [Git format-patch to be svn compatible?](http://stackoverflow.com/questions/708202/git-format-patch-to-be-svn-compatible) – PeeHaa Nov 28 '16 at 08:51
  • Yes it seems to be painful - but it's the only way by using a usb-stick – ebart Dec 04 '16 at 18:58
  • I was more hinting on the fact that I am scratching my head why you want to make it yourself so difficult by trying to use two different VCS like that. – PeeHaa Dec 05 '16 at 09:25

1 Answers1

0

There are few protocols supported by git for eg. ssh protocol and file they are used as scheme in URI to remote repositories

You should add on USB stick some remote for eg. origin or any other meaningfull name through ssh://user@comp1.net2/path/to/git/directory like this:

git remote add origin ssh://user@comp1.net2/path/to/repo.git

Then you're able to push or pull from that repo which is on USB stick. Adding another remote on USB stick with file:// sheme gives you opportunity to push/pull changes when plugged to first network.

If you're not on Linux and have no SSH then you're going to need some other network transport protocol, for eg. http then you need to setup some HTTP Server which will serve your repository.

brzuchal
  • 649
  • 8
  • 19