Something that few people remember is that if you have access to a filesystem through SSH, then you can have a remote Git repository with no configuration!
In the remote machine, you only need to create a bare repository:
git init --bare
And in your "client" machines you use it like any other remotes:
For quite a while before I built my homelab, my git server was a flash drive plugged into my OpenWRT router.
Honestly I still kind of prefer that to gitlab et al. It's nice to not have to leave my terminal to setup a new repo. It takes so much more effort to log into a website and dismiss a bunch of notifications before I can click even more buttons to create a new repo.
I like having all my repos accessible through the website, but I really just want to create new projects through ssh like a civilized person.
In the remote machine, you only need to create a bare repository:
git init --bare
And in your "client" machines you use it like any other remotes:
git remote add my_remote my_user@my_host:path_to_repo
It can be useful if for some reason you don't want to use GitHub/GitLab/Bitbucket/etc or as a glorified scp