git meanings of -distributed-

38
Git: a “Distributed” VCS? Discover what “distributed” VCS (Version Control system) actually means.

Upload: dchaffiol

Post on 21-Jan-2017

293 views

Category:

Software


0 download

TRANSCRIPT

Git: a “Distributed” VCS?

Discover what “distributed” VCS (Version Control system) actually means.

Daniel CHAFFIOLSofteam Cadextan (1999)

BNP-Paribas

Société Générale

HSBC

VonCStack Overflow(2008)

Git - Hg – SVN - ClearCase

Golang - Docker

Eclipse - Jenkins

Git: Distributed Version Control System

Git: Distributed Version Control System

2005, Linus torvalds

Git: Distributed Version Control System

2005, Linus torvalds

“I’m an egotistical bastard, and I name all my project after myself.First Linux, now git[1]”

[1]: git (n): British slang for a stupid or unpleasant person

Distributed:

○ Local repo○ Upstream vs. Downstream○ Full repo clone

Local repository

Your “local” is not “my local”

Git: Local repository

Distributed

Local file manager: Local repo

Git: Local repository

No setup

Just unzip an archive Local repo

git initgit commit...

No authentication

Just a declaration (user.name/user.email)

Git: Local repository

Local repo

git config:user.nameuser.email

No global hooks/settings

Local hooks are locals

Git: Local repository

Local repo

.git/hooks

No permission

644 (rw-r--r--) or 755 (rwxr-xr-x) only

Git: Local repository

Local repo

umask 022

No timestamp

git checkout even used to reset timestamps

Git: Local repository

Local repo

git commitgit checkout...

Recap: Local repository:

No authenticationBasic permission recordBasic timestamp record

Upstream vs. Downstream

You know one,not the other

Git: Upstream vs. Downstream

VCS: Version Control System

Upstream is remote: Remote repo

Git: Upstream vs. Downstream

VCS: Version Control System

Downstream is local: Remote repoLocal repo

UPSTREAMDownstream

Git: Upstream vs. Downstream

“No git server” or “git client”:

Direct access through shared filesystem: UPSTREAM repo

\\shared\path

Git: Upstream vs. Downstream

“No git server” or “git client”:

Remote access through listeners: Remote repo

query

Git: Upstream vs. Downstream

Multiple upstream:

All known: Downstream

repoUPSTREAM

repos

git fetch

git fetch

Git: Upstream vs. Downstream

Multiple upstream:

Example: GitHub fork Downstream

repo

DOWNSTREAM

UPSTREAMrepos

git fetch

original repo

forked repo

git push

Git: Upstream vs. Downstream

Multiple downstream repos:

All unknown: Localrepo

UPSTREAMrepos

git fetch

git fetch

Downstreamsrepos

Git: Upstream vs. Downstream

Multiple workflows (merge vs. publication):

Merge workflow:

Git: Upstream vs. Downstream

Multiple workflows (merge vs. publication):

Publication workflows:

Recap: Local repository:

No authenticationBasic permission recordBasic timestamp record

Upstream vs. Downstream:No ListenersDownstreams unknownPublication workflow

Full repository clone

If you can access it, you can clone it

Git: Full repository clone

You clone (almost) everything

All branches, all tags, all notes:

git clone

git fetch

Remote repoLocal repo

Git: Full repository clone

You clone (almost) everything

Not hooks or config though: Remote repoLocal repo

git clone/fetch/pullconfig

hooks

Git: Full repository clone

You clone what you need

Not “one giant unique repo”: Remote repoLocal repo

git clone

git clone

Git: Full repository clone

You do clone *all* the remote repo.

*All*: no authorization when reading:

git clone

git fetch

Remote repoLocal repo

Git: Full repository clone

You can put authorization when accessing the upstream repo.

I.E, add a “guardian” like gitolite: Remote repoLocal repo

git push

gitolite(perl)

git fetch

Git: Full repository clone

You can have audit when accessing the upstream repo.

I.E, gitolite can record git operations: Remote repoLocal repo

git push

gitolitegit fetch

Recap: Local repository:

No authenticationBasic permission recordBasic timestamp record

Upstream vs. Downstream:No ListenersDownstreams unknownPublication workflow

Full repository clone:No authorizationGitolite for authorization and auditSmaller-size git repos

Conclusion: Local repository:

No authenticationBasic permission recordBasic timestamp record

Upstream vs. Downstream:No ListenersDownstreams unknownPublication workflow

Full repository clone:No authorizationSmaller-size git reposGitolite for authorization and audit

Distributed VCS: Local: No authentication

Upstream: No Listeners

Clone: No authorization/audit