# Conceptual Question for git usage ...

3 messages from 2014-01-22 to 2014-01-22. Participants: John McIntyre, Andrew Keller.
Thread: https://gitlist.dev/t/35709

## John McIntyre, 2014-01-22 14:20

Subject: Conceptual Question for git usage ...
Message-ID: <CABQ4iYjfa1X0KkMm=VtoRt2j65E1cce7TyY_PU8WFr8DPQEtjw@mail.gmail.com>
URL: https://gitlist.dev/e/CABQ4iYjfa1X0KkMm%3DVtoRt2j65E1cce7TyY_PU8WFr8DPQEtjw%40mail.gmail.com

```
Hi,
I want to install git onto my home network - in fact, truth be told,
it's already on my server, but I have some questions as to its
implementation.

First of all, my network.  At the 'centre' (practically, if not
logically) is my Mac.  I consider this my 'central repository' of
everything.  Mail, documents, blog posts etc.  Everything is on this
machine.  The Mac is backed up i) to an external drive with Time
Machine, ii) to my Linux server (more on that below) via rsync and
iii) to my personal Linux laptop which sits on 27/7 at work via rsync.

My server.  This is a Linux server runing CentOS 6.5, and working as a
webserver, fileserver, MySQL server, mail server (primary MX), and is
the 'public face' of my domain name.

Then there are two other Linux servers - one running MySQL
replication, and the other as a publically-accessible 'sandbox' on
which people whom I train can connect via a specific port, and mess
around, with no possibility that what they do will damage other parts
of the LAN.

So basically, what I'd like to do is this.  I want to write code,
write blg posts, write essays for university, whatever.  And I want to
use git to maintain revisions, but where do I store them?  Do I make
the Mac my hub?  I have a git client on there.  Do I make the server
my 'hub'?  If I make the server the 'hub', then won't rsync back-ups
from the Mac to the server wipe them out?

I confess that my preference would be to use the server, because I
occasionally bring the Linux laptop home from the office and use that,
and don't want to connect it to the Mac.

Anyway, basically .. that's it.  Any ideas would be appreciated.  Thanks.

```

## Andrew Keller, 2014-01-22 15:03

Subject: Re: Conceptual Question for git usage ...
Message-ID: <CCFA1C8D-F0E3-43D9-87FD-B62807DB7EA8@kellerfarm.com>
URL: https://gitlist.dev/e/CCFA1C8D-F0E3-43D9-87FD-B62807DB7EA8%40kellerfarm.com
In-Reply-To: <CABQ4iYjfa1X0KkMm=VtoRt2j65E1cce7TyY_PU8WFr8DPQEtjw@mail.gmail.com>

```
On Jan 22, 2014, at 9:20 AM, John McIntyre <joh98.mac@gmail.com> wrote:

> …
> 
> So basically, what I'd like to do is this.  I want to write code,
> write blg posts, write essays for university, whatever.  And I want to
> use git to maintain revisions, but where do I store them?  Do I make
> the Mac my hub?  I have a git client on there.  Do I make the server
> my 'hub'?  If I make the server the 'hub', then won't rsync back-ups
> from the Mac to the server wipe them out?
> 
> …

Git's degree of flexibility in what is considered "the server" is valuable here.  I advise that you simply try a configuration, and see how it works.  It's easy to change where origin points later.

With that said, like you, I have a small ad-hoc setup of automated rsync backups between my various computers and servers, and I have found some characteristics useful:

* I have rsync saving backups into dedicated backup folders on the remote machines.  This eliminates ambiguity of what to back up (server A won't blow away server B's Documents folder, for example).

* Using a publicly accessible server has been useful.  I set up port forwarding to the machine, and set up a domain name pointing to the server.  In general, when I have Internet access, I can access the server that contains my repositories.  I always use the same domain name, even if I'm in the same room as the server.

Hope that helps,
Andrew

```

## John McIntyre, 2014-01-22 15:23

Subject: Re: Conceptual Question for git usage ...
Message-ID: <CABQ4iYjVSh_yG0jzc104LJ2hr9GhNnKrCZNw9337t+s4CiWryg@mail.gmail.com>
URL: https://gitlist.dev/e/CABQ4iYjVSh_yG0jzc104LJ2hr9GhNnKrCZNw9337t%2Bs4CiWryg%40mail.gmail.com
In-Reply-To: <CCFA1C8D-F0E3-43D9-87FD-B62807DB7EA8@kellerfarm.com>

```
Thank you for that, Andrew.

I'm going to follow your advice and just set up a test repository,
which won't be a disaster, if it gets damaged or erased.

I backup my /Users/john/Documents from my Mac to /home/john/Documents
on the Linux server.  Except for my mail directory, which comes from
$HOME/Library/Mail and lives on $HOME/.mac.mail.backup on the server.

2014/1/22 Andrew Keller <andrew@kellerfarm.com>:
> On Jan 22, 2014, at 9:20 AM, John McIntyre <joh98.mac@gmail.com> wrote:
>
>> …
>>
>> So basically, what I'd like to do is this.  I want to write code,
>> write blg posts, write essays for university, whatever.  And I want to
>> use git to maintain revisions, but where do I store them?  Do I make
>> the Mac my hub?  I have a git client on there.  Do I make the server
>> my 'hub'?  If I make the server the 'hub', then won't rsync back-ups
>> from the Mac to the server wipe them out?
>>
>> …
>
> Git's degree of flexibility in what is considered "the server" is valuable here.  I advise that you simply try a configuration, and see how it works.  It's easy to change where origin points later.
>
> With that said, like you, I have a small ad-hoc setup of automated rsync backups between my various computers and servers, and I have found some characteristics useful:
>
> * I have rsync saving backups into dedicated backup folders on the remote machines.  This eliminates ambiguity of what to back up (server A won't blow away server B's Documents folder, for example).
>
> * Using a publicly accessible server has been useful.  I set up port forwarding to the machine, and set up a domain name pointing to the server.  In general, when I have Internet access, I can access the server that contains my repositories.  I always use the same domain name, even if I'm in the same room as the server.
>
> Hope that helps,
> Andrew
>

```
