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
Azure SRE Agentで運用は楽になるのか?
kkamegawa
0
2.2k
テストカバレッジ100%を10年続けて得られた学びと品質
mottyzzz
2
590
Amazon RDS 向けに提供されている MCP Server と仕組みを調べてみた/jawsug-okayama-2025-aurora-mcp
takahashiikki
1
110
AIでLINEスタンプを作ってみた
eycjur
1
230
プロパティベーステストによるUIテスト: LLMによるプロパティ定義生成でエッジケースを捉える
tetta_pdnt
0
320
RDoc meets YARD
okuramasafumi
4
170
デザイナーが Androidエンジニアに 挑戦してみた
874wokiite
0
320
testingを眺める
matumoto
1
140
How Android Uses Data Structures Behind The Scenes
l2hyunwoo
0
430
基礎から学ぶ大画面対応(Learning Large-Screen Support from the Ground Up)
tomoya0x00
0
430
Kiroの仕様駆動開発から見えてきたAIコーディングとの正しい付き合い方
clshinji
1
210
Go言語での実装を通して学ぶLLMファインチューニングの仕組み / fukuokago22-llm-peft
monochromegane
0
120
Featured
See All Featured
Build your cross-platform service in a week with App Engine
jlugia
231
18k
Building Applications with DynamoDB
mza
96
6.6k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
126
53k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
46
7.6k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
112
20k
Imperfection Machines: The Place of Print at Facebook
scottboms
268
13k
GraphQLの誤解/rethinking-graphql
sonatard
72
11k
We Have a Design System, Now What?
morganepeng
53
7.8k
Bash Introduction
62gerente
615
210k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
50k
The Cost Of JavaScript in 2023
addyosmani
53
8.9k
Documentation Writing (for coders)
carmenintech
74
5k
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