How to Create a Local Git Server
A simple method on how to create a git repository on your local server
In this tutorial, I’ll show you how to create a git server in your local network.
You might be thinking why would I? Usually, when we’re working git repository, we go to online services like GitHub. We create a private project for privacy. But that’s not enough for all cases.
You maybe need a git repository to store password. Putting it in a cloud service is not cool.
There is a very simple way to set up your own git server.
I assume you understand how ssh works.
Let’s say you have raspberry pi at home. First, we enter the server remotely via ssh.
Let’s create our project under $HOME/git/myproject.git
directory.
Change your working directory there.
Create a bare git repository.
Now get back to your local machine. Open a terminal and clone this newly created git repository.
Then do whatever you do with that git repository. That’s it.
Cover Photo by Pankaj Patel on Unsplash