Sie sind auf Seite 1von 30

Git user group #1

Introduction to git

Marc-Antoine Perennou

Clever Cloud
Who I am

Marc-Antoine Perennou -

Marc-Antoine@Perennou.com
marc-antoine.perennou@clever-cloud.com

http://clever-cloud.com/
@Keruspe on twitter and identi.ca
http://github.com/Keruspe

Keruspe Git user group #1


The (D)VCS concept

What is a Version Control System ?

Keruspe Git user group #1


The (D)VCS concept

What is a Version Control System ?


Why must you use one if you do not do so already ?

Keruspe Git user group #1


The (D)VCS concept

What is a Version Control System ?


Why must you use one if you do not do so already ?
Why should you consider using or switching to a Distributed
VCS ?

VCS VS DVCS

Keruspe Git user group #1


The origin of Git

The creation of git


Linux development constraints (Too many developers,
thousands per year)
First release: 2005

Keruspe Git user group #1


The origin of Git

The creation of git


Linux development constraints (Too many developers,
thousands per year)
First release: 2005
The origin of its name

Keruspe Git user group #1


The origin of Git

The creation of git


Linux development constraints (Too many developers,
thousands per year)
First release: 2005
The origin of its name
The evolution/complexification and usage simplification of git

Keruspe Git user group #1


Creating a repository

One command: git init


This command creates the basic files needed by git into a
subdirectory named ”.git”

Keruspe Git user group #1


Basic usage

6 mandatory commands :
git init
git clone
git add
git commit
git push
git pull
With those commands (and eventually git remote), you can act
with git at least like you acted with SVN (for example)

Keruspe Git user group #1


Git server side

Introduction to github

Keruspe Git user group #1


Git server side

Introduction to github
Demonstration: sharing this presentation on github

Keruspe Git user group #1


Git server side

Introduction to github
Demonstration: sharing this presentation on github
For your company: gitolite

Keruspe Git user group #1


Git server side

Introduction to github
Demonstration: sharing this presentation on github
For your company: gitolite
Git with non-git backend

Keruspe Git user group #1


Some usefull basics

Explanations on the tracking system

Keruspe Git user group #1


Some usefull basics

Explanations on the tracking system


Configuration

Keruspe Git user group #1


Some usefull basics

Explanations on the tracking system


Configuration
Editing the last commit

Keruspe Git user group #1


Some usefull basics

Explanations on the tracking system


Configuration
Editing the last commit
Cleaning a working tree

Keruspe Git user group #1


Branching

Three commands:
git branch
git checkout
git merge

Keruspe Git user group #1


Advanced usage

Rebasing with git rebase / git pull –rebase

Keruspe Git user group #1


Advanced usage

Rebasing with git rebase / git pull –rebase


Patching with git format-patch and git am

Keruspe Git user group #1


Advanced usage

Rebasing with git rebase / git pull –rebase


Patching with git format-patch and git am
Backporting with git cherry-pick for maintainance

Keruspe Git user group #1


Advanced usage

Rebasing with git rebase / git pull –rebase


Patching with git format-patch and git am
Backporting with git cherry-pick for maintainance
Debugging with git bisect

Keruspe Git user group #1


Advanced usage

Rebasing with git rebase / git pull –rebase


Patching with git format-patch and git am
Backporting with git cherry-pick for maintainance
Debugging with git bisect
Tagging releases

Keruspe Git user group #1


Advanced usage

Rebasing with git rebase / git pull –rebase


Patching with git format-patch and git am
Backporting with git cherry-pick for maintainance
Debugging with git bisect
Tagging releases
Blaming colleagues

Keruspe Git user group #1


Demos

Failing merge

Keruspe Git user group #1


Demos

Failing merge
Successfull merge

Keruspe Git user group #1


Demos

Failing merge
Successfull merge
paludis patches

Keruspe Git user group #1


Demos

Failing merge
Successfull merge
paludis patches
play patches

Keruspe Git user group #1


Demos

Failing merge
Successfull merge
paludis patches
play patches
Backporting changes

Keruspe Git user group #1

Das könnte Ihnen auch gefallen