Over the years I think I’ve tried every solution (first with TextMate, then with Sublime Text 2) in this thread and while I’ve had decent luck with some of them, they’ve all come up short. So I made something that, so far, has worked great (for me). However, right now you should not try it unless all the follow are true about you.
[ul]
[li]You are using OS X.[/li]
[li]You know ‘enough’ git.[/li]
[li]You have git installed on your web server.[/li]
[li]You are using homebrew.[/li]
[li]You are using pip.
[/li][li]And some other stuff. If you look over the documentation, sparse though it is, you should get some idea.[/li][/ul]
It’s called GitSync.
github.com/ClockworkNet/GitSync
Basically it allows you to work on your local file system. Then anytime you ‘save’ (you write to the file system) GitSync which you run in the ‘background’ will pick up your changes and, using git and fabric (via ssh) it will send the changes to your websever server. There are a lot of advantages of doing it this way, some of them are.
[ul]
[li]Git keeps track of all your changes, so it’s like having a version history for everything. It’s not super useful because it contains almost every little change, but if you wanted something back you could get it.[/li]
[li]If things change on the server, say from a coworker also working on the same files, it won’t throw it away and hopefully it will merge everything smoothly. This is where it really helps to know something about git though because if you get ‘conflicted’ you’ll have to sort it out on your own.
Because, as far as sublime text is concerned, you are working on the local file system, everything is super fast.[/li]
[li]Even if you have a slow internet connection, it does not need to slow you down. You might have to wait a few extra seconds before you refresh the website you are working on but that’s way better then having to wait, even a half second, every time you save a file.[/li]
[li]and many many more.[/li][/ul]
So this software is alpha. However I have used it a lot and for several months now and it has made my life so much better. So I figured I should start spreading the word. Who knows maybe some of you will be inspired to help me take out the rough edges.
One big unknown, is if you are currently using git as your version control system, can this play nicely with it? Currently where I work we are still using svn so that has not really been a problem. I use svn for source code control and git for syncing.
Please let me know if you have any suggestions or ideas or bugs, and especially if you would like to help.
Thanks.