How do I access a git repository on a samba share?

10

2

I have a Samba share set up that I'd like to put a git repository on. I've tried searching google for the best way to use git on a Samba share, but it seems difficult to find anything on doing this as Samba uses git for development.

What is the best way to do this? Right now, I'm just working with Linux, but it would be nice to know how to do this in a cross-platform manner as well.

Jason Baker

Posted 2010-01-04T14:23:08.090

Reputation: 6 382

1i do not see any problems here, samba delivers files .. put the git repo on the share and end of story. – akira – 2010-01-11T12:18:08.107

Answers

3

The best way to access a git repository over a network in a platform independent manner from a single machine would be to run a git server on the machine. For how to setup a server, checkout this.

anand.trex

Posted 2010-01-04T14:23:08.090

Reputation: 1 552

2Your link has died, do you have another source? – James Caccese – 2011-09-15T21:14:53.940

Bump, for the dead link. – Drew Noakes – 2012-03-28T23:41:49.817

Ok I've updated the link to one from ProGit. – anand.trex – 2012-04-03T02:48:18.790

Does not seem to answer the question. Nobody asked for the "best way". – ceving – 2014-01-08T16:00:36.760

Link does not work (again?) – Janis Veinbergs – 2014-05-14T12:23:33.700

1This answer is pretty useless when all it does is provide a link. – magnattic – 2014-06-15T15:34:14.567

5

I do this all the time, and it works fine, just access the git repository over the file share as if it was local. I do this because I develop on windows but my test server is a linux box, so with a samba share I do not have to be pushing my changes to the server all time.

Be aware though, that different operating systems handle things like modified timestamps & line endings differently, so I do not recommend developing like this if you will be using the same repository over samba from multiple different operating systems. You will find when you switch from windows to linux (for example) that git will detect a bunch of files have changed, when the actually haven't...

N Reed

Posted 2010-01-04T14:23:08.090

Reputation: 681

2

Well, if you don't want to spend time configuring a lof ot stuff, you could just use a Dropbox account and set your git repository in your Dropbox folder.

GmonC

Posted 2010-01-04T14:23:08.090

Reputation: 2 322