Top Banner
Marco Behnke Git free & open source, distributed version control system Git
27

Marco Behnke Git free & open source, distributed version control system Git.

Apr 06, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Marco Behnke Git free & open source, distributed version control system Git.

Marco Behnke

Gitfree & open source, distributed version

control system

Git

Page 2: Marco Behnke Git free & open source, distributed version control system Git.

Pre-Git Ära

• RCS (1980): Verwaltung einzelner lokaler Dateien

• CVS (1989): Verwaltung ganzer Projektstrukturen; netzwerkfähig

• SVN (2000): „Besseres CVS“

Page 3: Marco Behnke Git free & open source, distributed version control system Git.

Geschichte

• 2005 als Ersatz für BitKeeper im Linux Kernel Projekt

• 21.12.2005 Version 1.0• 26.06.2011 Version 1.7.6

Page 4: Marco Behnke Git free & open source, distributed version control system Git.

Design

• Nicht-lineare Entwicklung• Kein zentraler Server• Datentransfer zwischen

Repositories• Kryptographische Sicherheit

der Projektgeschichte• Säubern des Repositories• Interoperabilität

Page 5: Marco Behnke Git free & open source, distributed version control system Git.

Nicht lineare Entwicklung

CVS

GIT

Page 6: Marco Behnke Git free & open source, distributed version control system Git.

Kein zentraler Server

Page 7: Marco Behnke Git free & open source, distributed version control system Git.

Datentransfer zwischen Repositories• push / pull• Git Protokoll• https, https, ftp• rsync

Page 8: Marco Behnke Git free & open source, distributed version control system Git.

Kryptographische Sicherheit Historie• Commitname basiert auf

Historie• Manipulationssichertheit• GPG Signatur pro Commit

möglich

Signed-off-by: Marco Behnke <[email protected]>

Page 9: Marco Behnke Git free & open source, distributed version control system Git.

Interoperabilität

• Checkout und Commit in SVN• CVS• Komplette Repository

Migration• ….

Page 10: Marco Behnke Git free & open source, distributed version control system Git.

Was Git nicht ist

• Keine Weiterentwicklung von CVS oder SVN

>>>> The slogan of Subversion for a while was "CVS done right", or something like that, and if you start with that kind of slogan, there's nowhere you can go. There is no way to do CVS right.” <<<< [Torvalds]

Page 11: Marco Behnke Git free & open source, distributed version control system Git.

Was macht Git so toll?

Page 12: Marco Behnke Git free & open source, distributed version control system Git.

Alles ist lokal

• Komplette lokale Kopie des Repositories

• Ggf. auch mit allen Branches• Commit erst lokal• Push dann remote

Page 13: Marco Behnke Git free & open source, distributed version control system Git.

Alles ist lokal

Page 14: Marco Behnke Git free & open source, distributed version control system Git.

Dezentralisiert

• Jeder Entwickler hat das komplette Repository

• Es kann – muss aber nicht – ein zentrales Repository geben

• Jeder kann von überall pullen

Page 15: Marco Behnke Git free & open source, distributed version control system Git.

Staging Area / Index

• Änderungen werden vor dem Commit manuell bereitgestellt

• Ganze Datei, Abschnitte oder einzelne Zeilen

• Tradioneller Workflow trotzdem möglich

Page 16: Marco Behnke Git free & open source, distributed version control system Git.

Staging Area / Index

Page 17: Marco Behnke Git free & open source, distributed version control system Git.

Billige lokale Branches

• Lokale Kopie eines anderen Branches

• Können – müssen aber nicht – remote veröffentlicht werden

• Können einfach gelöscht werden

• Git stash als spontaner Branch

Page 18: Marco Behnke Git free & open source, distributed version control system Git.

Workflow traditionell

Page 19: Marco Behnke Git free & open source, distributed version control system Git.

Workflow Integration Manager

Page 20: Marco Behnke Git free & open source, distributed version control system Git.

Git bisect

• Finde den Fehler durch Bisection

• Durch viele kleine Commitsgit bisect startgit bisect badgit bisect good b0f2ce0fe>>Bisecting: 675 revisions left to test after thisgit bisect bad>>Bisecting: 337 revisions left to test after thisgit bisect good1b62d9ceaa15312893c06dfc856d5026730bda6a is the first bad commit

Page 21: Marco Behnke Git free & open source, distributed version control system Git.

„Spontane“ Versionierung

IST Zustand• Viele TYPO3 Extensions• Wenig Versionierung• Keine Historie• Rollback nur begrenzt möglich

Page 22: Marco Behnke Git free & open source, distributed version control system Git.

„Spontane“ Versionierung

SOLL :• Einzelne Extensions

versionierencd /typo3conf/ext/sms_extensiongit initgit add --allgit commit --m „initial release“

• und los geht‘s!

Page 23: Marco Behnke Git free & open source, distributed version control system Git.

„Spontane“ Versionierung

• Ganze TYPO3 Installationen versionieren mit .gitignore.projectnbprojectalle/TYPO3/src/dirsalle/temp/dirsalle/user_upload/dirsalle/TER/extensions

• Und fertig.

Page 24: Marco Behnke Git free & open source, distributed version control system Git.

IDE Integration

• Jgit als JAVA Lib• Egit basiert auf Jgit für Eclipse• Netbeans Unterstützung

Page 25: Marco Behnke Git free & open source, distributed version control system Git.

Standalones

• TortoiseGit• Git Kommandozeilentools für

Windows, Linux, Mac, YourOSHere

• Git gui Tools (git gui, gitk)