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
82
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
59
Kurt - An archiving tool
zoranzaric
0
64
bup: Git for backups
zoranzaric
2
180
Other Decks in Programming
See All in Programming
Serena MCPのすすめ
wadakatu
4
980
Advance Your Career with Open Source
ivargrimstad
0
490
Your Perfect Project Setup for Angular @BASTA! 2025 in Mainz
manfredsteyer
PRO
0
170
NixOS + Kubernetesで構築する自宅サーバーのすべて
ichi_h3
0
640
Cloudflare AgentsとAI SDKでAIエージェントを作ってみた
briete
0
140
monorepo の Go テストをはやくした〜い!~最小の依存解決への道のり~ / faster-testing-of-monorepos
convto
2
470
スマホから Youtube Shortsを見られないようにする
lemolatoon
27
31k
Server Side Kotlin Meetup vol.16: 内部動作を理解して ハイパフォーマンスなサーバサイド Kotlin アプリケーションを書こう
ternbusty
3
180
その面倒な作業、「Dart」にやらせませんか? Flutter開発者のための業務効率化
yordgenome03
1
120
CSC509 Lecture 03
javiergs
PRO
0
330
Pull-Requestの内容を1クリックで動作確認可能にするワークフロー
natmark
2
490
PHPに関数型の魂を宿す〜PHP 8.5 で実現する堅牢なコードとは〜 #phpcon_hiroshima / phpcon-hiroshima-2025
shogogg
1
150
Featured
See All Featured
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.5k
For a Future-Friendly Web
brad_frost
180
9.9k
The Language of Interfaces
destraynor
162
25k
Building Adaptive Systems
keathley
43
2.8k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
33
2.5k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
34
6.1k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
45
2.5k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
The Power of CSS Pseudo Elements
geoffreycrofte
79
6k
VelocityConf: Rendering Performance Case Studies
addyosmani
332
24k
KATA
mclloyd
32
15k
Context Engineering - Making Every Token Count
addyosmani
5
230
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