or: how i learned to stopy worrying and love source control · 7 repository full history and files...
TRANSCRIPT
Git & Github or: how I learned to stopy worrying and love source control
Jan Nonnen
3
Allow rewinding changes
Easier to collaborate
See when something changed
Why use version control?
4
Torvalds - Replacement of BitKeeper for Kernel dev
Design Goals:
Distributed workflow
Protection again data corruption
Performance
History
5
No central server necessary
Every copy contains full history
Every repository (copy) is equal
Most operations don‘t require network
Distributed?
Terminology
7
Repository full history and files (.git)
Working directory visible files outside .git
Commit snapshot of project
Index staging area for next commit
Terminology
8
Remote repository
Local repository
Index
Working directory
clone
commit
add
push fetch
checkout
pull
9
Remote repository
Local repository
Index
Working directory
clone
commit
add
push fetch
checkout
pull
10
Remote repository
Local repository
Index
Working directory
clone
commit
add
push fetch
checkout
pull
11
Remote repository
Local repository
Index
Working directory
clone
commit
add
push fetch
checkout
pull
12
Remote repository
Local repository
Index
Working directory
clone
commit
add
push fetch
checkout
pull
13
Remote repository
Local repository
Index
Working directory
clone
commit
add
push fetch
checkout
pull
14
Remote repository
Local repository
Index
Working directory
clone
commit
add
push fetch
checkout
pull
15
Remote repository
Local repository
Index
Working directory
clone
commit
add
push fetch
checkout
pull
16
Remote repository
Local repository
Index
Working directory
clone
commit
add
push fetch
checkout
pull
17
Remote repository
Local repository
Index
Working directory
clone
commit
add
push fetch
checkout
pull
18
Remote repository
Local repository
Index
Working directory
clone
commit
add
push fetch
checkout
pull
19
Remote repository
Local repository
Index
Working directory
clone
commit
add
push fetch
checkout
pull
20
Remote repository
Local repository
Index
Working directory
clone
commit
add
push fetch
checkout
pull
21
Blob binary data
Tree folder entries of blobs
Commit snapshot of a tree
Tag fixed pointer to a commit
Branch pointer to a commit
Objects in Detail
22
Points to a tree and to ancestors
0 ancestors initial commit
>1 ancestors merge commit
„name“ is 40 digit SHA-1 hash
Commit
23
HEAD
master
time
24
HEAD
master
time
25
HEAD
master
time
26
HEAD
master
time
27
master
time
HEAD
fixing_javadoc
28
master
time
HEAD
fixing_javadoc
29
HEAD
master
time
fixing_javadoc
30
master
time
HEAD
fixing_javadoc
31
HEAD
master
time
fixing_javadoc
32
Long-living Branches
Feature Branches
Branching Strategies
33
Feature Branches
Source: https://www.atlassian.com/git/workflows
Github - Social Coding
34
35
Pull requests
Issues
Forks
Github
36 Pull Requests
37 Issues
38
http://www.syntevo.com/smartgithg/download
Git UI: SmartGit
39
https://help.github.com/
http://try.github.io
http://gitimmersion.com/
http://git-scm.com/book
Resources
40
http://try.github.io
https://help.github.com/articles/set-up-git
Github Hands-on