git going for the transylvania jug
TRANSCRIPT
Introduction to Git
at the Transylvania JUG
by Matthew McCullough
Matthew McCullough
@matthewmccull
Git
“Cool kids” version control system
Open Source
bash scripts ☛ C code
≉
Git-nounBritish Slang. an unpleasant
or contemptible person
-Oxford English Dictionary
“
”
I'm an egotistical bastard, and
I name all my projects
after myself. First Linux,
now git.-Linus Torvalds
“
”
➡How to commit, branch and tag
➡How Git implements a new commit-referencing syntax
➡How to pull and push changes between repositories
➡How to set up a Git repository
➡How to set up a Git repository
> cd myproj> git initInitialized empty Git repository in /stuff/myproj/.git/
➡How to set up a Git repository
➡How to commit, branch and tag
➡How Git implements a new commit-referencing syntax
➡How to pull and push changes between repositories
➡How to set up a Git repository
➡How to commit, branch and tag
➡How to commit
> git add <FILENAME>
Local Branches
Remote Branches
Upstream Branches
Working Copy
commit
> git status# On branch master# Initial commit# Changes to be committed:# (use "git rm --cached <file>..." to unstage)# new file: myfile.txt
> git commit -m”<MESSAGE>”[master (root-commit) 498cc44] My first commit 1 files changed, 5 insertions(+), 0 deletions(-) create mode 100644 myfile.txt
➡How to branch
> git branch <BRANCHNAME>
Local Branches
Remote Branches
Upstream Branches
Working Copy
Branches
> git checkout <BRANCHNAME>Switched to branch 'mybranch'
Local Branches
Remote Branches
Upstream Branches
Working Copy
Branches
Insane branch count?
Local Remote Upstream
Integ
Product
Integ
Product
Integ
Product
Local Remote Upstream
Integ
Product
Integ
Product
Integ
Product
Idea
Story
Feature FeatureFeature
Local Remote Upstream
Integ
Product
Integ
Product
Integ
Product
Idea
Story
Feature FeatureFeature
➡How to tag
> git tag <TAGNAME>
> git tag -a <TAGNAME> -m”<MESSAGE>”
➡How to commit, branch and tag
➡How to commit, branch and tag
➡How Git implements a new commit-referencing syntax
➡How to pull and push changes between repositories
➡How to set up a Git repository
➡How Git implements a new commit-referencing syntax
9AB223D28B1AA46EF1780B22F304982E39872C34
<html><body>
<p>This is a test</p><img src="http://ai.com/icon.gif">
</body></html>
> git logcommit 0fc27c73dea82a0576c6cf262fb517d24e75a223Author: Matthew McCullough <[email protected]>Date: Mon Oct 24 10:42:20 2013 +0300
Performance enhancement of calc engine
commit 7d946e814233814b1780ed1035da271cbb37206dAuthor: Matthew McCullough <[email protected]>Date: Mon Oct 24 12:59:41 2013 +0300
Translation to Esperanto
treetree: 7e8b1 webblob: 9ab16 index.html
a10b3 treeblob: 8d162 logo.jpgblob: 51d22 draw.js
7e8b1commit
tree: a10b3parent: nilauthor: Firdcommitter: Matthewmessage:
Major refactoringof the web content.
c67db
blob<html>
<body></body></html>
9ab16
blob//Some more javascriptvar renderSize
51d22
blob7D 8D B3 7F BD 12 9F E97B 78 9D 3F 5C A6 72 CB
8d162
Hashes
treetree: 7e8b1 webblob: 9ab16 index.html
a10b3 treeblob: 8d162 logo.jpgblob: 51d22 draw.js
7e8b1commit
tree: a10b3parent: nilauthor: Firdcommitter: Matthewmessage:
Major refactoringof the web content.
c67db
blob<html>
<body></body></html>
9ab16
blob//Some more javascriptvar renderSize
51d22
blob7D 8D B3 7F BD 12 9F E97B 78 9D 3F 5C A6 72 CB
8d162
Hashes
treetree: 7e8b1 webblob: 9ab16 index.html
a10b3 treeblob: 8d162 logo.jpgblob: 51d22 draw.js
7e8b1commit
tree: a10b3parent: nilauthor: Firdcommitter: Matthewmessage:
Major refactoringof the web content.
c67db
blob<html>
<body></body></html>
9ab16
blob//Some more javascriptvar renderSize
51d22
blob7D 8D B3 7F BD 12 9F E97B 78 9D 3F 5C A6 72 CB
8d162
Hashes
treetree: 7e8b1 webblob: 9ab16 index.html
a10b3 treeblob: 8d162 logo.jpgblob: 51d22 draw.js
7e8b1commit
tree: a10b3parent: nilauthor: Firdcommitter: Matthewmessage:
Major refactoringof the web content.
c67db
blob<html>
<body></body></html>
9ab16
blob//Some more javascriptvar renderSize
51d22
blob7D 8D B3 7F BD 12 9F E97B 78 9D 3F 5C A6 72 CB
8d162
Hashes
treetree: 7e8b1 webblob: 9ab16 index.html
a10b3 treeblob: 8d162 logo.jpgblob: 51d22 draw.js
7e8b1commit
tree: a10b3parent: nilauthor: Firdcommitter: Matthewmessage:
Major refactoringof the web content.
c67db
blob<html>
<body></body></html>
9ab16
blob//Some more javascriptvar renderSize
51d22
blob7D 8D B3 7F BD 12 9F E97B 78 9D 3F 5C A6 72 CB
8d162
Hashes
treetree: 7e8b1 webblob: 9ab16 index.html
a10b3 treeblob: 8d162 logo.jpgblob: 51d22 draw.js
7e8b1commit
tree: a10b3parent: nilauthor: Firdcommitter: Matthewmessage:
Major refactoringof the web content.
c67db
blob<html>
<body></body></html>
9ab16
blob//Some more javascriptvar renderSize
51d22
blob7D 8D B3 7F BD 12 9F E97B 78 9D 3F 5C A6 72 CB
8d162
Hashes
treetree: 7e8b1 webblob: 9ab16 index.html
a10b3 treeblob: 8d162 logo.jpgblob: 51d22 draw.js
7e8b1commit
tree: a10b3parent: nilauthor: Firdcommitter: Matthewmessage:
Major refactoringof the web content.
c67db
blob<html>
<body></body></html>
9ab16
blob//Some more javascriptvar renderSize
51d22
blob7D 8D B3 7F BD 12 9F E97B 78 9D 3F 5C A6 72 CB
8d162
Hashes
treetree: 7e8b1 webblob: 9ab16 index.html
a10b3 treeblob: 8d162 logo.jpgblob: 51d22 draw.js
7e8b1commit
tree: a10b3parent: nilauthor: Firdcommitter: Matthewmessage:
Major refactoringof the web content.
c67db
blob<html>
<body></body></html>
9ab16
blob//Some more javascriptvar renderSize
51d22
blob7D 8D B3 7F BD 12 9F E97B 78 9D 3F 5C A6 72 CB
8d162
Hashes
treetree: 7e8b1 webblob: 9ab16 index.html
a10b3 treeblob: 8d162 logo.jpgblob: 51d22 draw.js
7e8b1commit
tree: a10b3parent: nilauthor: Firdcommitter: Matthewmessage:
Major refactoringof the web content.
c67db
blob<html>
<body></body></html>
9ab16
blob//Some more javascriptvar renderSize
51d22
blob7D 8D B3 7F BD 12 9F E97B 78 9D 3F 5C A6 72 CB
8d162
v1 v2 v3
committree: 9a87bparent: nilauthor: Firdcommitter: Matthewmessage:
Major refactoringof the Javascript renderingengine.
c67db
committree: b22c1parent: c67dbauthor: Timcommitter: Firdmessage:
Minor update to HTML
9bd21
committree: b22c1parent: 9bd21author: Johnnycommitter: Joemessage:
New language transations
1c2d7
v1 v2 v3
committree: 9a87bparent: nilauthor: Firdcommitter: Matthewmessage:
Major refactoringof the Javascript renderingengine.
c67db
committree: b22c1parent: c67dbauthor: Timcommitter: Firdmessage:
Minor update to HTML
9bd21
committree: b22c1parent: 9bd21author: Johnnycommitter: Joemessage:
New language transations
1c2d7
v1 v2 v3
committree: 9a87bparent: nilauthor: Firdcommitter: Matthewmessage:
Major refactoringof the Javascript renderingengine.
c67db
committree: b22c1parent: c67dbauthor: Timcommitter: Firdmessage:
Minor update to HTML
9bd21
committree: b22c1parent: 9bd21author: Johnnycommitter: Joemessage:
New language transations
1c2d7
v1 v2 v3
committree: 9a87bparent: nilauthor: Firdcommitter: Matthewmessage:
Major refactoringof the Javascript renderingengine.
c67db
committree: b22c1parent: c67dbauthor: Timcommitter: Firdmessage:
Minor update to HTML
9bd21
committree: b22c1parent: 9bd21author: Johnnycommitter: Joemessage:
New language transations
1c2d7
v1 v2 v3
committree: 9a87bparent: nilauthor: Firdcommitter: Matthewmessage:
Major refactoringof the Javascript renderingengine.
c67db
committree: b22c1parent: c67dbauthor: Timcommitter: Firdmessage:
Minor update to HTML
9bd21
committree: b22c1parent: 9bd21author: Johnnycommitter: Joemessage:
New language transations
1c2d7
v1 v2 v3
committree: 9a87bparent: nilauthor: Firdcommitter: Matthewmessage:
Major refactoringof the Javascript renderingengine.
c67db
committree: b22c1parent: c67dbauthor: Timcommitter: Firdmessage:
Minor update to HTML
9bd21
committree: b22c1parent: 9bd21author: Johnnycommitter: Joemessage:
New language transations
1c2d7
v1 v2 v3
committree: 9a87bparent: nilauthor: Firdcommitter: Matthewmessage:
Major refactoringof the Javascript renderingengine.
c67db
committree: b22c1parent: c67dbauthor: Timcommitter: Firdmessage:
Minor update to HTML
9bd21
committree: b22c1parent: 9bd21author: Johnnycommitter: Joemessage:
New language transations
1c2d7
v1 v2 v3
committree: 9a87bparent: nilauthor: Firdcommitter: Matthewmessage:
Major refactoringof the Javascript renderingengine.
c67db
committree: b22c1parent: c67dbauthor: Timcommitter: Firdmessage:
Minor update to HTML
9bd21
committree: b22c1parent: 9bd21author: Johnnycommitter: Joemessage:
New language transations
1c2d7
RELEASE_1.0 HEAD
bug979branch
commitc67db
commit9bd21
commit1c2d7
commit8c2d1
commit1bdcd
commit2daa1
RELEASE_1.0 HEAD
bug979branch
commitc67db
commit9bd21
commit1c2d7
commit8c2d1
commit1bdcd
commit2daa1
RELEASE_1.0 HEAD
bug979branch
commitc67db
commit9bd21
commit1c2d7
commit8c2d1
commit1bdcd
commit2daa1
RELEASE_1.0 HEAD
bug979branch
commitc67db
commit9bd21
commit1c2d7
commit8c2d1
commit1bdcd
commit2daa1
RELEASE_1.0 HEAD
bug979branch
commitc67db
commit9bd21
commit1c2d7
commit8c2d1
commit1bdcd
commit2daa1
RELEASE_1.0 HEAD
bug979branch
commitc67db
commit9bd21
commit1c2d7
commit8c2d1
commit1bdcd
commit2daa1
➡How Git implements a new commit-referencing syntax
➡How to commit, branch and tag
➡How Git implements a new commit-referencing syntax
➡How to pull and push changes between repositories
➡How to set up a Git repository
➡How to pull and push changes between repositories
> git clone http://this.com/myproj.git> cd myprojCloning into hellogitworld...remote: Counting objects: 3871, done.remote: Compressing objects: 100% (73/73), done.remote: Total 3871 (delta 51), reused 3853 (delta 36)Receiving objects: 100% (3871/3871), 297.88 KiB | 35 KiB/s, done.Resolving deltas: 100% (51/51), done.
Local Branches
Remote Branches
Upstream Branches
Working Copy
merge merge
commit
fetch
push
clone clone clone
push
pull pull pull
Central Repo
Ce
nt
ra
liz
ed
Blessed Repo
Dic
ta
to
rs
hip
Certified Repo
Development Repo
Int
eg
ra
tio
n M
an
ag
ed
ContinuousIntegration
Server
➡How to pull and push changes between repositories
Introduction to Git & Gerrit
at the Transylvania JUG
by Matthew McCullough