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

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.

Leave a Reply