[fpc-other] GIT versioning server on Raspberry Pi?

Graeme Geldenhuys mailinglists at geldenhuys.co.uk
Tue May 30 16:37:30 CEST 2017


On 2017-05-30 06:53, Bo Berglund wrote:
> OK, I did not have in mind to use an RPi3 as the final system. I just
> wanted to acquaint myself with GIT using a small portable unit over
> the summer.

In that case, you don't even need a RPi... Simply practice by doing the 
following on your local system:

   mkdir /data/myremote.git
   cd /data/myremote.git
   git init --share --bare .

You just created your remote [bare] git repository. The term "bare" 
means that there is no checked out files. If you view that directory it 
simply shows all the normally hidden files that git uses to manage a 
repository.

Now for your working repository where you will do you day-to-day commits:

   cd /data/devel/
   git clone /data/myremote.git/ mywork

You will now have a Git repository in /data/devel/mywork/ which is a 
clone of the /data/myremote.git repository. It as automatically set up 
the "origin" as your Remote Git Repo. So if you to a git-push, the data 
will go to "origin"

Now playing around in this "mywork" repository. Create commits and 
branches. Then do a git-push and magically you will have updated the 
"origin" remote git repo too (which in this case is /data/myremote.git/)

What you learn here, is exactly how you would do things with a real 
remote repository.

I highly recommend everybody interested in using Git reads the free and 
open source "Pro Git" book [https://git-scm.com/book/en/v2]. It is 
available online or offline in various formats (PDF, ePub etc). Is is 
well written, fast to read and with tons of real-world Git examples.

Regards,
   Graeme

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

My public PGP key:  http://tinyurl.com/graeme-pgp


More information about the fpc-other mailing list