Skip to content

Weird Tip: Using localhost to merge folders on OS X

By GRAYBOX Alumni

Every now and then, a developer might find themselves needing to merge two folders on their local file system - like when updating several modules for EE without wanting to traipse up and down the file tree. Updating your local version of a site with the latest content assets from a production server. This should be a simple operation, but it's one of (the few) things that's just oddly difficult to achieve without going to some lengths on OS X. Here's one way to do it if you've got access to Transmit (or another halfway decent sftp client). Step 0 - If you don't already keep Remote Login enabled under sharing, that'll need to be on - and if you don't have a strong user account password stop reading and go set one (no really, do it - don't even get me started). Step 1 - In your sftp client (I'm using Transmit 4 from Panic in this example), connect to Localhost (or 127.0.0.1) via sftp using your account's login and password as credentials).

Step 2 - Navigate to the folder that you'll want merge into (your destination) Step 3 - Move your source folder into the SFTP window

Step 3.5 - ...and when asked choose 'Replace' or 'Merge' depending on the situation. The end result should be that your destination folder now has all it's original files (optionally overwritten from the source folder—just choose not to replace files specifically) along with all the files that existed only in the source folder before the merge.

Blog & Events

Featured Work