Search code examples
gitversion-controlofflinecollaboration

Eclipse Synchronize Workspace Offline


I'm in a team of Java developers at my school. Keeping everybody's workspace in sync with the other is quite a pain.

"Well, why don't you use git" here's the catch: We have no network. All the computers in this lab are offline, the instructor is really uptight about security and he got tired of kids breaking his machines, so he just took them all offline. Convincing him to get the machines on the network even for this project is useless. There's no point he's too uptight.

So far my group has "made do" by logging every change we do, every class we create etc. Then we transfer all of our workspaces to one PC where some unlucky person has to manually make the changes. As the program becomes more complex and changes become harder to find, our method is going to become extremely pointless and even more painful and tedious.

I do have experience with git, and eclipse has this amazing Synchronize workspace tool, but I'm not sure how to make that work for say a workspace contained on a USB.

Another thought; a simple ad-hoc network. Say we have 2 PC's in our group just tether them together with a Ethernet cable and one can act as the server, and one can access stuff from it. This doesn't seem practical because I don't have admin and there isn't enough time to hack the PC and get admin access. Its windows 7 by the way.

Well i hope this is all the info you need, i'll be happy to answer any questions regarding the question and information that may have been overlooked.

Edit: There is no network infrastructure in the lab, I have no network or network infrastructure.


Solution

  • Put your Git repo on the USB stick and make everyone commit/merge/rebase into it. Just configure new "remote" that will be stored there and regularly synchronize with the stick. That should work fine. Easier than building an ad-hoc network.

    Update

    For instance say you want to share and synchronize that repo on some USB stick (from Git repositories view):

    enter image description here

    Create a new bare repo on the stick:

    S:\> git --bare init myProject
    

    Add your repo as remote:

    S:\myProject> git remote add myRepo M:\sources\learnyounode
    

    Fetch all data from it including branches (hence *): (update I just realized you will want to have a different spec on the first fetch, instead of *:* use '+refs/heads/*:refs/heads/*'

    S:\myProject> git fetch myRepo '+refs/heads/*:refs/heads/*'
    

    The repository will be ready. Now on each of your machines, for each of your repositories do (in your repo folder):

    M:\sources\learnyounode> git remote add mainRepo S:/myProject
    

    Refresh Git repositories view in Eclipse to see:

    enter image description here

    You could also do that all using Eclipse instead of commandline Git, but it would be quite screenshot heavy description.