I probably have too many computers. Often, this leads me to need some version of some source code on one box, that only exists on another. I used to check into a temporary branch, then check out from that branch, but that often leads to unpleasant merge problems. Another thing I’ve tried is just using scp to transfer files, but that can be time consuming with a slow connection or a lot of source. I can’t believe it took me this long to think of it, but the most sensible solution is to use rsync.
To pull the files from the computer with current source to older source navigate to your source directory and type:
rsync -avuz new.source.machine:workspacedir/sourcedir . (don’t forget the .)
To put new changes back, it’s just:
rsync -avuz . new.source.machine:workspacedir/sourcedir
You also might want to add the
--delete option if you’ve been doing a lot of refactoring.
Another thing I ran into is that Eclipse doesn’t really like adding new projects directly to the workspace. The work around I’ve found is to make sure the project exists within Eclipse on the machine you want to work on before attempting to rsync.
Did you like this? Please share:
The Lost Year: A Failed Experiment to Switch Away From Mac
Fed up with the Apple Keyboard, I bought a ThinkPad, installed Linux, and promptly decided that I hated computers.
Maker's Space, Manager's Space
The Grand Remote Work Experiment: A Retrospective
The COVID-19 pandemic has lead to an unexpected experiment in remote working. What has worked and why?