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
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
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
After doing that, just use your git repository as usual.
-
Anywhere reachable by ssh ↩
Top comments (3)
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.
For that, gitlab :)
Other Git placement options: Secondary HDD or SSD, USB flash, Home NAS, Raspberry Pi, ...