Clone git repo hosted on a Windows shared folder from Mac OS X

I host a git remote repo on a Windows shared folder. I clone it using:

git clone //git-host-pc/SharedFolder/MyProject/

This command works from a Windows PC, but on a Mac, I get this error:

  • Git push fail to a Windows share
  • How to git rm a file whose name starts with ':'
  • Deploying a git branch together with its submodule from Github to Heroku
  • cvs2git: Possibility to keep mapping from CVS revision numbers to Git revision Hash
  • git checkout --patch, but failed, Can't locate in @INC
  • git clone vs copy paste, what's the difference?
  • fatal: repository '//git-host-pc/SharedFolder/MyProject' does not exist

    Trying git clone smb://git-host-pc/SharedFolder/MyProject gives me this error – fatal: Unable to find remote helper for 'smb'.

    Note: I’ve found this question has been asked before mine – Use a git repos on a windows share from osx, however the OP there hasn’t provided his exact commands, or the error messages, and that’s why his question is unanswered.

    Edit: I forgot to mention, but the shared folder is visible from the Mac, I can see it in Finder.

  • Can't add the “!” symbol in my git commit message
  • Visual Studio 2013 Team Explorer/Git integration missing files
  • How to use git to manage one codebase but have different environments
  • Exclude a directory from git diff
  • How is the git name determined when committing and pushing
  • Git on Windows fileshare is SLOOOW compared to GitHub
  • One Solution collect form web for “Clone git repo hosted on a Windows shared folder from Mac OS X”

    I kind of like to think that remote file system access is an OS thing, and that cloning repos is an application-level thing, so this would be my approach:

    You should just be able to mount that SMB share with your OS’es functions to a local directory and clone from there, instead of hoping git has a transport for SMB.

    How to mount:

    Connect to the server on your Mac. Now, on your Mac, from Finder’s Go menu, choose “Connect to Server.” Enter the IP address you just obtained from your PC, preceded by smb://, as shown:

    enter image description here

    UPDATE: To use your PC’s name instead of IP address, replace the number with the name. So if your PC’s name is “MyWindowsBox”, you’d use smb://mywindowsbox (not case-sensitive).

    If it finds your server, you’ll get prompted to enter your network credentials – by default, your Windows username and password:

    enter image description here

    Where to find the mounted folder:

    Once I mounted the //git-host-pc/SharedFolder in that way, I found it in /Volumes/SharedFolder.

    Git Baby is a git and github fan, let's start git clone.