Could you please explain, do I really need to install git server on the remote machine if I only need to place repository there and access it over ssh?
My ignorance probably starts from misunderstanding some key git operation principle so I would be glad if someone will explain it to me.
I thought that remote server for git is just a place where it stores files pretty much like local folder of my PC and I can have remote server with ssh access to host my repo on it without a need to install git server binaries there.
Is that possible? If not, could you explain me this thing I miss?
All the files required by git to run are stored locally to a checkout (in the
.gitdirectory). You could just access your git repository over SSH and effectively treat it like a repository on your local machine, e.g by mounting the remote folder locally.However, I’m not sure why you’d want to do that. You can’t do anything useful without the git binaries installed. If you just wanted to use the repository for private versioning, then you might as well install and run in locally, and back it up with your usual backup methods. If you want to use the repository to collaborate with others, then you need the git binaries available on a server that all your collaborators can access.
There is no meaningful distinction between a git “server” and a git “client”. It’s a distributed versioning system, which means each checkout is a fully-functioning version repository in its own right.