问题
Folks,
My devs and I are running into an issue that I can't seem to solve. It seems like such a common problem that I'm amazed I haven't seen a 'good solution' ... but I haven't.
Remote server contains our PHP in a git repo. Devs want to be able to make an edit and test it without having to commit/push/pull, etc. Makes a lot of sense, especially for the JS/HTML guy.
One dev just ssh's in and uses vi. Another wishes to use Zend Studio/Eclipse -- great, it has an ability for using a remote server via SSH; but it's not that slick ... if you do a git pull on the target server, and then edit the file locally and save it, it doesn't update the cache or let you know you're clobbering someone else's changes. (Dealkiller) It also doesn't sync down .git so you have do all git operations remotely.
SSHfs, AFP, SMB ; all are slow when grepping code... and suck over a WAN connection.
A intelligently designed remote drive mount with local caching that doesn't clobber files when they change --- does this exist or is it still a dream? I'm at the point of suggesting the guys use Unison or two-way rsync at this point. We once had someone suggest a Dropbox for syncing ... it's getting that bad...
回答1:
another possibility would be to branch your dev repository and to align every team member on a common way of coding. You said one of your member ssh's in directly and uses vi on console. Just instruct him to work on his own dev branch on the machine.
Set up a Hook/script - to fetch the latest stable and push them to your trunk
来源:https://stackoverflow.com/questions/17984986/how-to-reliably-and-quickly-develop-against-a-remote-server-with-a-local-ide