DEV Community

Boris Quiroz
Boris Quiroz

Posted on

Unlimited git repositories

Many developers owns one or more instances in any of the many "cloud providers" out there. And most of them uses git to track their project. For this, github or gitlab are pretty good alternatives but, is there any other alternative?

Yes, you can use nothing or go for Bitbucket or manage your own! Which is, in fact, something ridiculous simple and you just need to have an instance/virtual machine running anywhere 1.

The process:

In your local machine (read: your laptop), create your project repository and git init it:

local: ~ $ cd ~/Code/sample
local: ~/Code/sample $ git init
Enter fullscreen mode Exit fullscreen mode

On the other hand, on your remote server let's init a git bare repository:

remote: ~ $ mkdir ~/git
remote: ~ $ cd ~/git
remote: ~/git $ git init --bare sample.git
Enter fullscreen mode Exit fullscreen mode

Now, assuming that you can reach your remote service using a fancy name, like dev.mydomain.io, let's configure our local using that name:

local: ~ $ git remote add origin boris@dev.mydomain.io:/git/sample.git
Enter fullscreen mode Exit fullscreen mode

After doing that, just use your git repository as usual.


  1. Anywhere reachable by ssh 

Top comments (3)

Collapse
 
akashkava profile image
Akash Kava

Well that is just a git, what about issues, members and access rights with teams, tracking team, there is much more to just git. And maintaining version upgrades of all installed apps is a another headache.

Collapse
 
boris profile image
Boris Quiroz

For that, gitlab :)

Collapse
 
vlasales profile image
Vlastimil Pospichal

Other Git placement options: Secondary HDD or SSD, USB flash, Home NAS, Raspberry Pi, ...