marco behnke git free & open source, distributed version control system git
TRANSCRIPT
Marco Behnke
Gitfree & 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“
Geschichte
• 2005 als Ersatz für BitKeeper im Linux Kernel Projekt
• 21.12.2005 Version 1.0• 26.06.2011 Version 1.7.6
Design
• Nicht-lineare Entwicklung• Kein zentraler Server• Datentransfer zwischen
Repositories• Kryptographische Sicherheit
der Projektgeschichte• Säubern des Repositories• Interoperabilität
Nicht lineare Entwicklung
CVS
GIT
Kein zentraler Server
Datentransfer zwischen Repositories• push / pull• Git Protokoll• https, https, ftp• rsync
Kryptographische Sicherheit Historie• Commitname basiert auf
Historie• Manipulationssichertheit• GPG Signatur pro Commit
möglich
Signed-off-by: Marco Behnke <[email protected]>
Interoperabilität
• Checkout und Commit in SVN• CVS• Komplette Repository
Migration• ….
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]
Was macht Git so toll?
Alles ist lokal
• Komplette lokale Kopie des Repositories
• Ggf. auch mit allen Branches• Commit erst lokal• Push dann remote
Alles ist lokal
Dezentralisiert
• Jeder Entwickler hat das komplette Repository
• Es kann – muss aber nicht – ein zentrales Repository geben
• Jeder kann von überall pullen
Staging Area / Index
• Änderungen werden vor dem Commit manuell bereitgestellt
• Ganze Datei, Abschnitte oder einzelne Zeilen
• Tradioneller Workflow trotzdem möglich
Staging Area / Index
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
Workflow traditionell
Workflow Integration Manager
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
„Spontane“ Versionierung
IST Zustand• Viele TYPO3 Extensions• Wenig Versionierung• Keine Historie• Rollback nur begrenzt möglich
„Spontane“ Versionierung
SOLL :• Einzelne Extensions
versionierencd /typo3conf/ext/sms_extensiongit initgit add --allgit commit --m „initial release“
• und los geht‘s!
„Spontane“ Versionierung
• Ganze TYPO3 Installationen versionieren mit .gitignore.projectnbprojectalle/TYPO3/src/dirsalle/temp/dirsalle/user_upload/dirsalle/TER/extensions
• Und fertig.
IDE Integration
• Jgit als JAVA Lib• Egit basiert auf Jgit für Eclipse• Netbeans Unterstützung
Standalones
• TortoiseGit• Git Kommandozeilentools für
Windows, Linux, Mac, YourOSHere
• Git gui Tools (git gui, gitk)
Ressourcen
• http://code.google.com/p/tortoisegit/
• http://git-scm.com/download• http://www.jgit.org/• http://eclipse.org/egit/
Quellen
http://git-scm.com/http
://en.wikipedia.org/wiki/Git_%28software%29
http://projekte.sitegeist.de/projects/sitegeist/wiki/GIT_Doku
http://whygitisbetterthanx.com/