Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I use OS X for development and I want to push changes to dev server on every ⌘+S.
When I check out a different branch, I want the local folder to update accordingly.

So I figured I need an automatic, two-way sync solution.

My editor of choice is Sublime Text (which is awesome, you totally should check it out).
I began my quest with Sublime Text SFTP plugin by Will Bond but found it unstable and slow.

Then I attacked the problem with Panic Transmit.
It is stunningly beautiful. However, it didn't help me either.

Transmit offers two options:

  • two-way sync between local and remote folder;
  • mount SFTP to the filesystem.

Alas, its two-way sync is manual and has to be invoked by pressing a button.
(I could probably get around this by writing some clever AppleScript—but I don't know it.)

SFTP mounting is great—unfortunately, it has major disadvantages: file searching is predictably slow and there seems to be no way to tell Transmit that files have changed on server. You need to unmount and mount again to see the remote changes. This makes branches impossible to work with.

I'm really confused now and I don't feel like wasting a couple of hours on a wrong solution. I'm open to suggestions for a tool to improve my workflow.

Here's what I found so far. I'm not sure any of those can actually watch remote folder for changes.

Note that I'm looking for a solution that works out of the box. I don't want a tool that can't handle new/changed/deleted files or folders without fiddling with its source code.

share|improve this question
    
Why not just use a good IDE that can help you doing this? –  Thorbjørn Ravn Andersen Aug 14 '12 at 6:13

4 Answers 4

Old question, but here's my answer:

I use a Unix tool called Unison. This is a command-line tool that allows for two way sync.

The good is that it's highly configurable: ignore certain file names, directories, synchronize multiple folders, which side wins in a conflict, many other things.

The bad is that you have to not be scared of the command line and both the server and the client have to have Unison installed; both installations need to be the same version and built with the same version of OCAML.

But I've been using it multiple times an hour every work day for the past year and it's been awesome -- it's really fast, really easy to fire off from the command line.

share|improve this answer

Have you considered using something like Git? Hosting the files on GitHub or setting up your own git server.

This should help: http://stackoverflow.com/questions/455698/best-visual-client-for-git-on-mac-os-x

share|improve this answer
1  
I do use Git, however I don't have a running environment on my laptop so in order to test each smallest change I have to do a commit and push. This makes commit history meaningless and is somewhat tedious, although this is exactly what I'm doing now, with ST2 & Github for Mac making the experience slightly more fun and less painful. –  Dan Feb 16 '12 at 1:37
1  
Do either of these help? stackoverflow.com/questions/2275010/… or stackoverflow.com/questions/5054174/… –  afragen Feb 16 '12 at 2:48
    
I'll definitely take a look at these questions, thanks a ton. –  Dan Feb 16 '12 at 2:59

The following AppleScript allows you to sync a remote folder with a local folder using Transmit

https://github.com/lmullen/AppleScript---Transmit---sync-local-directory-to-FTP-directory

Unfortunately, it appears to default to syncing the remote folder with the local, and what I want is the opposite: to download updated files from the server onto my computer.

share|improve this answer

A very old question, but maybe my own answer helps. I also used SublimeText (I think I've still got it somewhere) because I like the way it opens files so fast — especially on older Macs. However, for more serious work, a better IDE would definitely fit your requirements better.

Since you're fine in acquiring new/different software, give Panic's Coda a try. You already liked Transmit, which is also a product from Panic. Coda sits between SublimeText and super-sophisticated IDEs like, say, Eclipse, and it can do pretty much what you wish — keep folders in sync between your local computer and the remote server, publish and sync on demand, and, additionally, keep your local data also in sync with GitHub, Google Code, or any other popular versioning system based on either Git or SVN.

Coda suffered a bit from performance in the past (namely in rendering code in colour when fast-scrolling), but current versions have been completely revamped and are almost as fast as SublimeText. It's also plugin-based — the PHP/JavaScript/HTML validation plugin is a must, since Coda's internal code validation features are not stellar in comparison. And, these days, you can use your Transmit server settings on Coda and vice-versa, as well as on any iOS device you might own, via their clever apps which sync the settings among themselves.

This almost sounds like propaganda for Panic... I wouldn't have mentioned Coda if you hadn't mentioned Transmit!

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.