Michael
Michael

Reputation: 455

What exactly is a git server?

I understand that a git server hosts the master copy of a git repository. But what technically constitutes one? If I am in Eclipse, for example, and configure a remote in my repository is there anything special that that remote must be? Could the remote just be a folder inside a mapped network drive on a windows server? I'm wondering because I see a range of options to connect with the remote, including local file.

I suppose what my question boils down to, is are there special git protocol stuff that a git server must handle, or is it really just a means of serving the files that comprise the repository?

Upvotes: 3

Views: 1136

Answers (2)

mipadi
mipadi

Reputation: 410652

You can communicate with a remote Git repo over a number of protocols: ssh, rsync, local files, ftp, and, yes, a special Git protocol, to name a few (a broader list is available here and here). Git ships with a tool, git-daemon for handling its own git protocol, if you choose to set a server up in such a way.

Upvotes: 3

Emil Davtyan
Emil Davtyan

Reputation: 14089

Could the remote just be a folder inside a mapped network drive on a windows server? I'm wondering because I see a range of options to connect with the remote, including local file.

Yes, it can just be as simple as a local folder. Of course that is if you don't need any authentication or authorization.

I suppose what my question boils down to, is are there special git protocol stuff that a git server must handle, or is it really just a means of serving the files that comprise the repository?

There is two protocols one over HTTP and another over SSH. I believe the HTTP protocol is read only for all and has no authorization, but I don't remember.

The SSH protocol though is an easy way to set up a git server on any computer you have SSH access to. Underneath, each time you call git push or git pull your installed git will SSH to the server and run either git receive pack or git upload pack respectively and proceed with a protocol that will determine the smallest PACK file that you can either send or receive to meet your needs.

You can read all the dirty details about the git protocol here or here is a simpler explanation.

Upvotes: 2

Related Questions