Too Long; Didn't Read
Hosting your own git server can be a fun learning experience used to understand the ins and outs of what goes into maintaining a codebase in private environments. You can set up a working private git-server in no time following the guide if you have a Raspberry-Pi handy.
You can also set up on VM or AWS machines or any hosting service with Linux.
NOTE: This guide just shows the basic setup, security mechanisms regarding user privileges, and committing restrictions that still need to be set up but are beyond the scope of this article.