开发者

Using git over sshfs is too slow

I'm using git over sshfs (under Mac OS X 10,5, 10.7) but it's too slow.

Everytime I logged in remote server direcly, to use git command.

I tried this post, http://kerneltrap.org/开发者_运维技巧mailarchive/git/2008/10/23/3768494 however it doesn't work.

Does anyone know any good ideas?


You could pick some other filesystem. SSHFS is mainly a convenience tool. MacOS support NFS mounts, for example, and that is fast.

Another way to go ahead would be to use rsync or unison ('two-way rsync' tool). These do really quick sync between the remote and local filesystem. Coupled with some quick shell aliases for compiling/running remotely, it is a nice workaround.

Another way would be to run your development environment remotely over VNC/X11. This makes the IDE somewhat more sluggish, but the code doesn't need to be synced.

A mix of the above is to make a Virtual machine clone of the remove server, run it on your local box, and share folders via the VM or some local NFS between the two.

You could also tweak sshfs. There are some tuning mount options, and you can also turn off encryption. It gives roughly 2x speedup overall, so don't expect wonders.

Being in the same shoes as the poster, I've looked for solutions for years, but failing to do so, I've unhappily settled with fine-tuned sshfs, coupled with occasional rsyncs, and patience.


I know this is very old but I run into this problem daily. I have a very complicated environment that would be virtually impossible/lengthy to recreate locally. We have things everywhere and working with 3rd party APIs cPanel APIs etc.

The only solution that works for me is to mount and work on the files locally over sshfs but when it's time to git I have a terminal window open that's just ssh'd in and this works for me. Is there a reason you can't/don't want to have a terminal open? Otherwise that seems to be the fastest solution and most reliable to me.


If I understood it correctly you're directly accessing the git repository over sshfs.

The whole point of git is being distributed and be able to push/pull around, so why don't you just clone the repo to the local fs? Remember that git clone works from a filesystem too, you don't need to clone from a "networked" (ssh, http, git, etc...) repository.

$ git clone /my_sshfs_mountpoint/repo

and you're ready to rock. Just remember to git push back your work when you're done.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜