Search code examples
gitmingwmsysgit

Git/Bash slow when run from Windows on shared Linux folder


  1. My Ubuntu box shares my codebase in \\ubuntubox\codebase full read / write permissions (samba).
  2. On my Windows 7 64-bit box, I've mapped the above shared folder to X:. I can access / write / execute / delete files at whim.
  3. Running a simple git status from a terminal in Linux: 1 to 3 seconds to get the status
  4. Running a git status from the MINGW terminal in the Windows box (what is installed by default by Git for windows) on the shared folder: 10-15 seconds.

Is there perhaps a "trick" I'm missing to make git.exe (the Windows executable) work faster on a shared folder?

At the moment I'm using putty to ssh into the ubuntu box and do all git stuff from the command line. However, my IDE of choice (the awesome PHPStorm) has a tremendously helpful git integration which I'd like to continue to use, wihtout having to wait 10 secs+ for each git command.

Any ideas?


Solution

  • There's no trick about working on a git repository located on a network share, because git isn't designed to work like this.

    It is designed instead to work locally, and communicate changes with remote locations. To do so you need to:

    • Make sure you're connected to \\ubuntubox\codebase
    • run git clone //ubuntubox/codebase (notice, no backslashes) from a local folder

    Then you'll have a local copy of the repository, and you'll be able to push/pull your changes back with the remote place (origin repository).