Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Version Control - Eine Einführung
Search
Zoran Zaric
October 14, 2011
Programming
3
79
Version Control - Eine Einführung
Zoran Zaric
October 14, 2011
Tweet
Share
More Decks by Zoran Zaric
See All by Zoran Zaric
How FUTW does that Puppet Thing
zoranzaric
1
46
Kurt - An archiving tool
zoranzaric
0
57
bup: Git for backups
zoranzaric
2
170
Other Decks in Programming
See All in Programming
Build Apps for iOS, Android & Desktop in 100% Kotlin With Compose Multiplatform (mDevCamp 2024)
zsmb
0
470
サイコロで理解する統計的仮説検定の考え方
tatamiya
4
1.1k
Snowflakeで眠ったデータを起こそう!
estie
0
150
2 週間で Twitter Bot を作ってみた
contour_gara
0
790
Azure OpenAI Serviceのプロンプトエンジニアリング入門
tomokusaba
3
910
Goのエラースタックトレースの歴史と今後
sonatard
10
1.8k
Git Lint
bkuhlmann
4
760
OpenAPIを中心に考えるAPI開発入門 / Introduction to API Development with a Focus on OpenAPI
seike460
PRO
2
180
Fast JSX: Don't clone props object #28768
yossydev
1
200
Direct Style Effect Systems The Print[A] ExampleA Comprehension Aid
philipschwarz
PRO
0
140
Fragment Composition of GraphQL
quramy
13
1.5k
初心者のためのRubyKaigi入門/RubyKaigi Introduction
a_matsuda
10
1.6k
Featured
See All Featured
jQuery: Nuts, Bolts and Bling
dougneiner
60
7.2k
Typedesign – Prime Four
hannesfritz
36
2.1k
The Power of CSS Pseudo Elements
geoffreycrofte
62
5k
Producing Creativity
orderedlist
PRO
338
39k
Become a Pro
speakerdeck
PRO
13
4.6k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
34
6k
Visualization
eitanlees
137
14k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
8
3.4k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
66
14k
Documentation Writing (for coders)
carmenintech
60
4k
5 minutes of I Can Smell Your CMS
philhawksworth
199
19k
Teambox: Starting and Learning
jrom
128
8.4k
Transcript
Version Control eine Einf¨ uhrung
Zoran Zari´ c 2007 Ausbildung zum Fachinformatiker f¨ ur Systemintegration
Informatik Student an der TU Darmstadt seit 2008 Git seit Mitte 2009 bup seit April 2010
toc 1. Fragen 2. Basics 3. Git 4. Beispiele /
Demo 5. Hintergr¨ unde 6. Tools
Fragen
Fragen 1. Wer weiß was Version Control ist?
Fragen 1. Wer weiß was Version Control ist? 2. Wer
kennt Subversion / CVS?
Fragen 1. Wer weiß was Version Control ist? 2. Wer
kennt Subversion / CVS? 3. Wer weiß was Distributed Version Control ist?
Fragen 1. Wer weiß was Version Control ist? 2. Wer
kennt Subversion / CVS? 3. Wer weiß was Distributed Version Control ist? 4. Wer kennt Git / Mercurial?
Fragen Version Control?
Fragen $ echo "Halo Wlet!" > README $ mkdir v0.1
$ mv README v0.1 $ echo "Hallo Welt!" > README
Fragen Distributed Version Control?
Fragen $ echo "Hier die bestimmt finale Version unseres Codes"
\ | mail -s "Code final, echt jetzt" -a main.c
[email protected]
Git “stupid content tracker” “content addressable” Verteiltes Versionierungssystem Vollst¨ andige
Kopie des Repositories lokal lokales Committen, Branchen, Mergen Linus Torvalds begann Entwicklung 2005 Snapshot- statt Diff-basiert
Fragen Diffs? Snapshots?
Fragen Diffs? Snapshots? Diffs (Subversion) $ cat foo.1 Halo Wlet!
$cat foo.2.diff 1c1 < Halo Wlet! --- > Hallo Welt! $patch foo.1 -o - < foo.2.diff patching file foo.1 Hallo Welt! Snapshots (Git) $ cat foo.1 Halo Wlet! $cat foo.2 Hallo Welt!
Installation Windows mysysgit http://code.google.com/p/msysgit/ TortoiseGit http://code.google.com/p/tortoisegit/ Ubuntu aptitude install git
OSX http://code.google.com/p/git-osx-installer/
Beispiele Config $ git config user.name "Zoran Zaric" $ git
config user.email "
[email protected]
"
Beispiele Erste Schritte $ git init $ echo "Halo Wlet!"
> README $ git add README $ git commit -m "Initial import" # (1) $ git log $ echo "Hallo Welt!" > README $ git add README $ git commit -m "Fix spelling errors" # (2) $ git log 2 1
Beispiele Branchen und Mergen $ git status # On branch
master $ git checkout -b new-branch $ git branch $ echo "Lorem ipsum" >> README $ git add README $ commit -m "Add noise" # (3) $ git diff master $ git checkout master $ git merge new-branch $ git branch -d new-branch 3 2 1
¨ A¨ a¨ a¨ ahm! war da nicht was mit
distributed?!1elf
Beispiele Remotes $ git clone https://github.com/apenwarr/bup.git $ git remote rename
origin upstream # ¨ Anderungen holen $ git fetch upstream $ git merge upstream/master # ¨ Anderungen hochladen $ git push upstream master
Aber, aber. . . upstream sind ¨ Anderungen und ich
habe ¨ Anderungen. . . und. . . und. . . jetzt?
Beispiele Rebase # Lokale ¨ Anderungen auf Basis # von
upstream/master $ echo "..." >> README $ git add README $ git commit -m "..." # (3) # ¨ Anderungen holen $ git fetch upstream # (4) 4 3 2 1
Beispiele Rebase # Lokale ¨ Anderungen auf Basis # von
upstream/master $ echo "..." >> README $ git add README $ git commit -m "..." # (3) # ¨ Anderungen holen $ git fetch upstream # (4) # Eigene ¨ Anderungen auf Upstream # anwenden $ git rebase upstream/master 4 3 2 1
Basics SHA1 DAG (Directed Acyclic Graph) gerichteter zyklenfreier Graph
Ein Repository BLOBs e69de29 Hello World
Ein Repository BLOBs e69de29 Trees 82e3a75 100644 blob 5e1c309dae7f45e0f39b1bf3ac3cd9db12e7 README
Ein Repository BLOBs e69de29 Trees 82e3a75 Commits 3dfe461f tree a3d703e579dc9baae20456eb63fa49f5e4e
author Zoran Zaric <
[email protected]
>1314498536 +0200 committer Zoran Zaric <
[email protected]
>1314498536 +0200 Example commit
Ein Repository BLOBs e69de29 Trees 82e3a75 Commits 3dfe461f Tags &
Branches v0.1 master
Ein Repository BLOBs e69de29 Trees 82e3a75 Commits 3dfe461f Tags &
Branches v0.1 master 3dfe461f 82e3a75 e69de29 25b2be3 78af04f 41c28e8 master v1.0
Ein Repository DAG Directed Acyclic Graph 3dfe461f init 25b2be3 master
v0.1 abcdef dev
Ein Repository DAG Directed Acyclic Graph Packfiles e69de29 82e3a75 3dfe461f
41c28e8 78af04f 25b2be3
Tools
Tools Tig gitk gitg Tower Git gitkx
Weiterf¨ uhrendes / Nachschlagewerk http://progit.org/ http://gitref.org/ http://sea.ucar.edu/event/unlocking-secrets-git http://blip.tv/scott-chacon
Danke zorzar auf freenode & hackint
[email protected]
(Email & Jabber)
zoranzaric.de github.com/zoranzaric gplus.zoranzaric.de @zoranzaric Slides: zoranzaric.de/git-ophase1112.pdf