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
81
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
58
Kurt - An archiving tool
zoranzaric
0
63
bup: Git for backups
zoranzaric
2
180
Other Decks in Programming
See All in Programming
Google I/O Extended Incheon 2025 ~ What's new in Android development tools
pluu
1
290
生成AI、実際どう? - ニーリーの場合
nealle
0
110
コーディングは技術者(エンジニア)の嗜みでして / Learning the System Development Mindset from Rock Lady
mackey0225
2
490
UbieのAIパートナーを支えるコンテキストエンジニアリング実践
syucream
2
390
GUI操作LLMの最新動向: UI-TARSと関連論文紹介
kfujikawa
0
960
DockerからECSへ 〜 AWSの海に出る前に知っておきたいこと 〜
ota1022
5
1.1k
TROCCO×dbtで実現する人にもAIにもやさしいデータ基盤
nealle
0
240
自作OSでDOOMを動かしてみた
zakki0925224
1
1.3k
Claude Code と OpenAI o3 で メタデータ情報を作る
laket
0
130
レガシープロジェクトで最大限AIの恩恵を受けられるようClaude Codeを利用する
tk1351
2
130
未来を拓くAI技術〜エージェント開発とAI駆動開発〜
leveragestech
2
150
STUNMESH-go: Wireguard NAT穿隧工具的源起與介紹
tjjh89017
0
380
Featured
See All Featured
Large-scale JavaScript Application Architecture
addyosmani
512
110k
Stop Working from a Prison Cell
hatefulcrawdad
271
21k
Being A Developer After 40
akosma
90
590k
Java REST API Framework Comparison - PWX 2021
mraible
33
8.8k
How to Think Like a Performance Engineer
csswizardry
25
1.8k
Into the Great Unknown - MozCon
thekraken
40
2k
It's Worth the Effort
3n
186
28k
VelocityConf: Rendering Performance Case Studies
addyosmani
332
24k
Why Our Code Smells
bkeepers
PRO
338
57k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
183
54k
Product Roadmaps are Hard
iamctodd
PRO
54
11k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
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