Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using git over sshfs is too slow

Tags:

git

sshfs

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?

like image 514
banyan Avatar asked Aug 30 '11 15:08

banyan


2 Answers

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.

like image 132
Agoston Horvath Avatar answered Oct 10 '22 10:10

Agoston Horvath


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.

like image 30
o_O Avatar answered Oct 10 '22 09:10

o_O