How can I use a remote git executable for all git operations when accessing a file via SSHFS?
I mount a remote system's git repo via SSHFS on my local computer. The git repo is medium-sized with about 1000 files and a few years of history. My local git executable it is unusably slow for all operations on SSHFS.
Time for git status:
- Executing git from the Remote system: 0.012s total
- Local git on SSHFS: More than 2 minutes.
Constraints:
- I'm not allowed to store source code on my laptop due to corporate policy so a normal push/pull git workflow isn't allowed.
- I'd prefer to keep git functionality enabled over SSHFS rather than disabling git on SSHFS and performing git operations on the remote machine.
- There's a number of Emacs tools that use git including magit, git-gutter, git-gutter+.