The same thing can happen with Github, Bitbucket or other similar services.
After all: they are just a company with commercial interests.

These online services also have different pricing plans and various restrictions, but
when you host it yourself the restrictions are mostly the resource limits of the system and
your connection, therefore it is a much more flexible solution.

For the hosting it is recommended to use a so-called "bare" repository.
A bare repository means no files are checked out in the folder itself.
To create a bare repository use git init with the --bare argument:

$ git init --bare

I recommend to create a separate user and group for the source-code repositories.
In the examples we will assume the user is called "src".

Login as the src user and create the files. To create a directory for
the repos, in this example /home/src/src:

Using git-daemon you can clone the repositories publicly using the efficient
git:// protocol. An alternative without having to use git-daemon is by using anonymous SSH,
HTTPS or any public shared filesystem.

When you use a private-only repository I recommend to just use SSH without git-daemon.

Install the git package. The package should contain "git daemon":

# pkg_add git

Enable the daemon:

# rcctl enable gitdaemon

Set the gitdaemon service flags to use the src directory and use all the available
repositories in this directory. The command-line flags "--export-all" exports all
repositories in the base path. Alternatively you can use the "git-daemon-export-ok"
file (see the git-daemon man page).

# rcctl set gitdaemon flags --export-all --base-path="/home/src/src"

Run directly the service as _gitdaemon:

# rcctl set gitdaemon user _gitdaemon

Instead of root and then changing uid as per default flag in /etc/rc.d/gitdaemon: