Merge branch 'git-vortrag'

This commit is contained in:
Jan-Erik Rediger 2014-07-16 18:41:12 +02:00
commit 718ff00033
36 changed files with 1218 additions and 0 deletions

6
Vorträge/git/Gemfile Normal file
View File

@ -0,0 +1,6 @@
source :rubygems
gem 'bluecloth'
gem 'nokogiri'
gem 'showoff'
gem 'gli'
gem 'heroku'

View File

@ -0,0 +1,48 @@
GEM
remote: http://rubygems.org/
specs:
addressable (2.2.7)
blankslate (2.1.2.4)
bluecloth (2.2.0)
gli (1.5.1)
heroku (2.21.3)
launchy (>= 0.3.2)
netrc (~> 0.7.1)
rest-client (~> 1.6.1)
rubyzip
json (1.6.5)
launchy (2.0.5)
addressable (~> 2.2.6)
mime-types (1.17.2)
netrc (0.7.1)
nokogiri (1.5.2)
parslet (1.3.0)
blankslate (~> 2.0)
rack (1.4.1)
rack-protection (1.2.0)
rack
rest-client (1.6.7)
mime-types (>= 1.16)
rubyzip (0.9.6.1)
showoff (0.7.0)
bluecloth
gli (>= 1.3.2)
json
nokogiri
parslet
sinatra
sinatra (1.3.2)
rack (~> 1.3, >= 1.3.6)
rack-protection (~> 1.2)
tilt (~> 1.3, >= 1.3.3)
tilt (1.3.3)
PLATFORMS
ruby
DEPENDENCIES
bluecloth
gli
heroku
nokogiri
showoff

2
Vorträge/git/config.ru Normal file
View File

@ -0,0 +1,2 @@
require "showoff"
run ShowOff.new

View File

@ -0,0 +1,18 @@
!SLIDE center withlogo
# ende
### Jan-Erik 'badboy' Rediger \<badboy@ctdo.de\>
### git clone http://repos.ctdo.de/git/git-vortrag.git
### [git-vortrag.git](http://repos.ctdo.de/git/?p=git-vortrag.git;a=summary)
### [online version](http://git-talk-ctdo.heroku.com/)
!SLIDE bullets sources
# Quellen
* <http://git-scm.com/>
* <https://github.com/>
* <http://progit.org/>
* <http://www.kernel.org/pub/software/scm/git/docs/>
* <http://gitref.org/>

View File

@ -0,0 +1,32 @@
!SLIDE
# erste Schritte
!SLIDE
# Installation
$ pacman -S git
$ apt-get install git-core
$ yum install git-core
$ brew install git
!SLIDE command
$ git config --global user.name \
"Jan-Erik Rediger"
$ git config --global user.email \
"badboy@ctdo.de"
!SLIDE command big
# git init
!SLIDE command big
# git clone
!SLIDE command
git clone \
http://repos.ctdo.de/git/git-vortrag.git

View File

@ -0,0 +1,98 @@
!SLIDE
# der __.git__ Ordner
!SLIDE command smallest
$ tree .git
.git
├── branches
├── config
├── description
├── HEAD
├── hooks
│   └── [...]
├── info
│   └── exclude
├── objects
│   ├── info
│   └── pack
└── refs
├── heads
└── tags
!SLIDE center
# config
* `/etc/gitconfig`
* `~/.gitconfig`
* `.git/config`
!SLIDE command small
$ cat ~/.gitconfig
[user]
email = badboy@ctdo.de
name = Jan-Erik Rediger
[alias]
cia = commit -am
lol = log --oneline --graph --decorate
!SLIDE command smallest
$ tree .git
.git
├── branches
├── config
├── description
├── HEAD
├── hooks
│   └── [...]
├── info
│   └── exclude
├── objects
│   ├── info
│   └── pack
└── refs
├── heads
└── tags
!SLIDE bullets incremental
# objects
* die (gepackten) Dateien & Daten
* benannt nach der SHA1
* ` 32/09658ac8d80bc9726d3a33d77e3dfc5fe6035e`
!SLIDE command smallest
$ tree .git
.git
├── branches
├── config
├── description
├── HEAD
├── hooks
│   └── [...]
├── info
│   └── exclude
├── objects
│   ├── info
│   └── pack
└── refs
├── heads
└── tags
!SLIDE bullets incremental
# refs
* Zeiger auf verschiedene Revisionen
* head/master
* tags/v0.0.1
* remotes/origin/HEAD
* einzelne Dateien enthalten wieder nur den SHA1-Hash

View File

@ -0,0 +1,29 @@
!SLIDE bullets incremental
# basic workflow
* Edit
* Stage
* Review
* Commit
!SLIDE center
![wd-ind-repo_2](wd-ind-repo_2.png)
!SLIDE center
![wd-ind-repo_1](wd-ind-repo_1.png)
!SLIDE center
![wd-ind-repo_3](wd-ind-repo_3.png)
!SLIDE center
![wd-ind-repo_4](wd-ind-repo_4.png)
!SLIDE center
![wd-ind-repo_5](wd-ind-repo_5.png)

View File

@ -0,0 +1,163 @@
!SLIDE commandline incremental
$ git init ctdo-projekt
Initialized empty Git repository in ~/ctdo-projekt/.git/
$ cd ctdo-projekt
!SLIDE commandline incremental
$ echo "Hello world" > README
$ git status
# On branch master
#
# Initial commit
#
# Untracked files:
# (use "git add <file>..." to include in what will
# be committed)
#
# README
nothing added to commit but untracked files present
(use "git add" to track)
!SLIDE commandline
$ echo "Hello world" > README
$ git status
# On branch master
#
# Initial commit
#
# Untracked files:_
# (use "git add <file>..." to include in what will
# be committed)
#
# README_
nothing added to commit but untracked files present
(use "git add" to track)
!SLIDE commandline incremental
$ git add README
$ git status
# On branch master
#
# Initial commit
#
# Changes to be committed:
# (use "git rm --cached <file>..." to unstage)
#
# new file: README
#
!SLIDE commandline
$ git add README
$ git status
# On branch master
#
# Initial commit
#
# Changes to be committed:
# (use "git rm --cached <file>..." to unstage)
#
# new file: README_
#
!SLIDE commandline incremental
$ git commit -m 'init'
[master (root-commit) 794d395] init
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 README
$ git status
# On branch master
nothing to commit (working directory clean)
!SLIDE commandline incremental
$ git log
commit 794d3953e63b0b0e661206479ae70bc5f21d553c
Author: Jan-Erik Rediger <badboy@ctdo.de>
Date: Mon Mar 05 01:20:55 2012 +0200
init
!SLIDE commandline incremental
$ echo "© ctdo" >> README
$ git status
# On branch master
# Changes not staged for commit:
# (use "git add <file>..." to update what will
# be committed)
# (use "git checkout -- <file>..." to discard changes
# in working directory)
#
# modified: README
#
no changes added to commit (use "git add" and/or
"git commit -a")
!SLIDE commandline
$ echo "© ctdo" >> README
$ git status
# On branch master
# Changes not staged for commit:
# (use "git add <file>..." to update what will
# be committed)
# (use "git checkout -- <file>..." to discard changes
# in working directory)
#
# modified: README_
#
no changes added to commit (use "git add" and/or
"git commit -a")
!SLIDE commandline incremental
$ git add README
$ git diff --cached
diff --git c/README w/README
index d00491f..446a974 100644
--- c/README
+++ w/README
@@ -1 +1,2 @@
Hello world
+© ctdo
!SLIDE commandline incremental
$ git commit -m 'added info'
[master bdc13db] added info
1 files changed, 1 insertions(+), 0 deletions(-)
!SLIDE commandline incremental
$ git log
commit bdc13dbd21b5f9c91e7d678bfc57eea1714c5482
Author: Jan-Erik Rediger <badboy@ctdo.de>
Date: Mon Mar 05 01:32:37 2012 +0200
added info
commit 794d3953e63b0b0e661206479ae70bc5f21d553c
Author: Jan-Erik Rediger <badboy@ctdo.de>
Date: Mon Mar 05 01:20:55 2012 +0200
init
!SLIDE commandline incremental
$ git diff HEAD^
diff --git c/README w/README
index d00491f..446a974 100644
--- c/README
+++ w/README
@@ -1 +1,2 @@
Hello world
+© ctdo

View File

@ -0,0 +1,31 @@
!SLIDE commandline
# Dateien ignorieren
$ cat .gitignore
*.[oa]
*~
!SLIDE commandline incremental
# Weitere Kommandos:
$ git rm file
# Entfernt eine Datei
$ git mv file1 file2
# Verschiebt eine Datei
!SLIDE commandline incremental
# Dateien doch nicht committen
$ git reset HEAD file
# Datei aus dem Staging-Bereich entfernen
!SLIDE commandline incremental
# Änderungen zurücksetzen
$ git checkout -- file
# Änderungen verwerfen

View File

@ -0,0 +1,72 @@
!SLIDE center
# Branches
![branching](branching.jpg)
!SLIDE commandline incremental
$ git branch newbranch
$ git checkout newbranch
Switched to branch 'newbranch'
$ git branch
master
* newbranch
!SLIDE commandline
$ git branch newbranch ← legt neue Datei an
$ git checkout newbranch
Switched to branch 'newbranch'
$ git branch
master
* newbranch
!SLIDE commandline
$ git branch newbranch
$ git checkout newbranch ← Änderungen im akt. Verzeichnis
Switched to branch 'newbranch'
$ git branch
master
* newbranch
!SLIDE commandline
$ git checkout -b newbranch
Switched to branch 'newbranch'
!SLIDE center
![parent snapshot](git-parent-snapshot.png)
!SLIDE center
![branched snapshot](git-branched-head.png)
!SLIDE commandline
$ echo "another line" >> README
$ git commit -am 'another commit'
...
$
!SLIDE center
![branched head](git-branched-head.png)
!SLIDE center
![branched newcommit](git-branched-newcommit.png)
!SLIDE center
# Merging
!SLIDE command
$ git checkout master
$ git merge newbranch
!SLIDE command
$ git branch -d newbranch

View File

@ -0,0 +1,51 @@
!SLIDE commandline incremental
# Remotes
$ git clone http://repos.ctdo.de/git/git-vortrag.git
oder nachträglich
$ git remote add ctdo \
http://repos.ctdo.de/git/git-vortrag.git
!SLIDE commandline
# Änderungen fetchen
$ git fetch origin
!SLIDE commandline
# Änderungen fetchen
$ git fetch ctdo
!SLIDE commandline
# Änderungen fetchen
$ git fetch [remote]
!SLIDE commandline incremental
# Änderungen direkt mergen
$ git pull origin master
Kurzschreibweise für:
$ git fetch origin master
$ git merge origin/master
!SLIDE commandline incremental
# lokale Änderungen pushen
$ git push origin master
$ git push origin master:master
# remote Branch löschen
$ git push origin :master

View File

@ -0,0 +1,348 @@
!SLIDE bullets incremental cmdlist
# git
* init
* clone
* add
* commit
* log
* diff
* branch
* checkout
* merge
* fetch
* pull
* push
!SLIDE center
# 12 Kommandos.
!SLIDE small
add |
add--interactive |
am |
annotate |
apply |
archimport |
archive |
bisect |
bisect--helper |
blame |
branch |
bundle |
cat-file |
check-attr |
checkout |
checkout-index |
check-ref-format |
cherry |
cherry-pick |
citool |
clean |
clone |
commit |
commit-tree |
config |
count-objects |
credential-cache |
credential-cache--daemon |
credential-store |
cvsexportcommit |
cvsimport |
cvsserver |
daemon |
describe |
diff |
diff-files |
diff-index |
difftool |
difftool--helper |
diff-tree |
fast-export |
fast-import |
fetch |
fetch-pack |
filter-branch |
fmt-merge-msg |
for-each-ref |
format-patch |
fsck |
fsck-objects |
gc |
get-tar-commit-id |
grep |
gui |
gui--askpass |
hash-object |
help |
http-backend |
http-fetch |
http-push |
imap-send |
index-pack |
init |
init-db |
instaweb |
log |
lost-found |
ls-files |
ls-remote |
ls-tree |
mailinfo |
mailsplit |
merge |
merge-base |
merge-file |
merge-index |
merge-octopus |
merge-one-file |
merge-ours |
merge-recursive |
merge-resolve |
merge-subtree |
mergetool |
mergetool--lib |
merge-tree |
mktag |
mktree |
mv |
name-rev |
notes |
pack-objects |
pack-redundant |
pack-refs |
parse-remote |
patch-id |
peek-remote |
prune |
prune-packed |
pull |
push |
quiltimport |
read-tree |
rebase |
rebase--am |
rebase--interactive |
rebase--merge |
receive-pack |
reflog |
relink |
remote |
remote-ext |
remote-fd |
remote-ftp |
remote-ftps |
remote-http |
remote-https |
remote-testgit |
repack |
replace |
repo-config |
request-pull |
rerere |
reset |
revert |
rev-list |
rev-parse |
rm |
send-email |
send-pack |
shell |
sh-i18n |
sh-i18n--envsubst |
shortlog |
show |
show-branch |
show-index |
show-ref |
sh-setup |
stage |
stash |
status |
stripspace |
submodule |
svn |
symbolic-ref |
tag |
tar-tree |
unpack-file |
unpack-objects |
update-index |
update-ref |
update-server-info |
upload-archive |
upload-pack |
var |
verify-pack |
verify-tag |
web--browse |
whatchanged |
write-tree
!SLIDE small allcommands
add |
add--interactive |
am |
annotate |
apply |
archimport |
archive |
bisect |
bisect--helper |
blame |
branch |
bundle |
cat-file |
check-attr |
checkout |
checkout-index |
check-ref-format |
cherry |
cherry-pick |
citool |
clean |
clone |
commit |
commit-tree |
config |
count-objects |
credential-cache |
credential-cache--daemon |
credential-store |
cvsexportcommit |
cvsimport |
cvsserver |
daemon |
describe |
diff |
diff-files |
diff-index |
difftool |
difftool--helper |
diff-tree |
fast-export |
fast-import |
fetch |
fetch-pack |
filter-branch |
fmt-merge-msg |
for-each-ref |
format-patch |
fsck |
fsck-objects |
gc |
get-tar-commit-id |
grep |
gui |
gui--askpass |
hash-object |
help |
http-backend |
http-fetch |
http-push |
imap-send |
index-pack |
init |
init-db |
instaweb |
log |
lost-found |
ls-files |
ls-remote |
ls-tree |
mailinfo |
mailsplit |
merge |
merge-base |
merge-file |
merge-index |
merge-octopus |
merge-one-file |
merge-ours |
merge-recursive |
merge-resolve |
merge-subtree |
mergetool |
mergetool--lib |
merge-tree |
mktag |
mktree |
mv |
name-rev |
notes |
pack-objects |
pack-redundant |
pack-refs |
parse-remote |
patch-id |
peek-remote |
prune |
prune-packed |
pull |
push |
quiltimport |
read-tree |
rebase |
rebase--am |
rebase--interactive |
rebase--merge |
receive-pack |
reflog |
relink |
remote |
remote-ext |
remote-fd |
remote-ftp |
remote-ftps |
remote-http |
remote-https |
remote-testgit |
repack |
replace |
repo-config |
request-pull |
rerere |
reset |
revert |
rev-list |
rev-parse |
rm |
send-email |
send-pack |
shell |
sh-i18n |
sh-i18n--envsubst |
shortlog |
show |
show-branch |
show-index |
show-ref |
sh-setup |
stage |
stash |
status |
stripspace |
submodule |
svn |
symbolic-ref |
tag |
tar-tree |
unpack-file |
unpack-objects |
update-index |
update-ref |
update-server-info |
upload-archive |
upload-pack |
var |
verify-pack |
verify-tag |
web--browse |
whatchanged |
write-tree
# 160

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

View File

@ -0,0 +1,160 @@
git-add
git-add--interactive
git-am
git-annotate
git-apply
git-archimport
git-archive
git-bisect
git-bisect--helper
git-blame
git-branch
git-bundle
git-cat-file
git-check-attr
git-checkout
git-checkout-index
git-check-ref-format
git-cherry
git-cherry-pick
git-citool
git-clean
git-clone
git-commit
git-commit-tree
git-config
git-count-objects
git-credential-cache
git-credential-cache--daemon
git-credential-store
git-cvsexportcommit
git-cvsimport
git-cvsserver
git-daemon
git-describe
git-diff
git-diff-files
git-diff-index
git-difftool
git-difftool--helper
git-diff-tree
git-fast-export
git-fast-import
git-fetch
git-fetch-pack
git-filter-branch
git-fmt-merge-msg
git-for-each-ref
git-format-patch
git-fsck
git-fsck-objects
git-gc
git-get-tar-commit-id
git-grep
git-gui
git-gui--askpass
git-hash-object
git-help
git-http-backend
git-http-fetch
git-http-push
git-imap-send
git-index-pack
git-init
git-init-db
git-instaweb
git-log
git-lost-found
git-ls-files
git-ls-remote
git-ls-tree
git-mailinfo
git-mailsplit
git-merge
git-merge-base
git-merge-file
git-merge-index
git-merge-octopus
git-merge-one-file
git-merge-ours
git-merge-recursive
git-merge-resolve
git-merge-subtree
git-mergetool
git-mergetool--lib
git-merge-tree
git-mktag
git-mktree
git-mv
git-name-rev
git-notes
git-pack-objects
git-pack-redundant
git-pack-refs
git-parse-remote
git-patch-id
git-peek-remote
git-prune
git-prune-packed
git-pull
git-push
git-quiltimport
git-read-tree
git-rebase
git-rebase--am
git-rebase--interactive
git-rebase--merge
git-receive-pack
git-reflog
git-relink
git-remote
git-remote-ext
git-remote-fd
git-remote-ftp
git-remote-ftps
git-remote-http
git-remote-https
git-remote-testgit
git-repack
git-replace
git-repo-config
git-request-pull
git-rerere
git-reset
git-revert
git-rev-list
git-rev-parse
git-rm
git-send-email
git-send-pack
git-shell
git-sh-i18n
git-sh-i18n--envsubst
git-shortlog
git-show
git-show-branch
git-show-index
git-show-ref
git-sh-setup
git-stage
git-stash
git-status
git-stripspace
git-submodule
git-svn
git-symbolic-ref
git-tag
git-tar-tree
git-unpack-file
git-unpack-objects
git-update-index
git-update-ref
git-update-server-info
git-upload-archive
git-upload-pack
git-var
git-verify-pack
git-verify-tag
git-web--browse
git-whatchanged
git-write-tree

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

View File

@ -0,0 +1,37 @@
!SLIDE center
# Code Hosting
!SLIDE center
# einfach selber machen
!SLIDE commandline
## auf dem Server
$ git init --bare myrepo.git
Initialized empty Git repository in /home/git/myrepo.git/
!SLIDE commandline
## lokal:
$ git remote add origin git@myserver.com:myrepo.git
$ git push origin master
## oder
$ git clone git@myserver.com:myrepo.git
!SLIDE center bullets
## oder halt gemanaged
* [repos.ctdo.de/git/](http://repos.ctdo.de/git/)
* [![github](github-logo.png)](https://github.com)
* [![google code](google-code.png)](http://code.google.com/hosting/)
* [![gitourious](gitorious-logo.png)](http://gitorious.org/)
* [![bitbucket](bitbucket-logo.png)](http://bitbucket.org/)
* [repo.or.cz](http://repo.or.cz/)

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

View File

@ -0,0 +1,55 @@
!SLIDE center withlogo start
![git](git-scm-logo.png)
__© git-scm.com__
### Jan-Erik 'badboy' Rediger \<badboy@ctdo.de\>
!SLIDE
# Was ist ![git](git-logo.png)?
!SLIDE bullets
# Git is an open source, distributed version control system designed for speed and efficiency
!SLIDE
# verteilt
!SLIDE
# (fast) alles ist lokal
!SLIDE incremental
## bedeutet:
* alles ist schnell
* jedes Repo ist ein Backup
* funktioniert offline
!SLIDE bow
# unveränderlich
!SLIDE center remindseverything
# Git vergisst _fast_ nichts!
!SLIDE bow
# Snapshots
!SLIDE center
![checkins over time](checkins-over-time.png)
!SLIDE bullets incremental
# offline
* Diff
* durch die History blättern
* Änderungen committen
* verschiedene Revisionen auschecken
* Branching

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

BIN
Vorträge/git/logo_ctdo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

13
Vorträge/git/script.js Normal file
View File

@ -0,0 +1,13 @@
$(function() {
$("#preso").bind("showoff:loaded", function() {
$(".bow").parent().addClass('bow-parent');
$("code.command").each(function() {
var t = $(this);
if(t.text().match(/_$/)) {
t.text(t.text().replace(/_$/, ''));
t.addClass('command-colored');
}
});
});
});

View File

@ -0,0 +1,9 @@
{
"name": "git-vortrag",
"sections": [
{ "section": "intro" },
{ "section": "first_steps" },
{ "section": "hosting" },
{ "section": "ende" }
]
}

46
Vorträge/git/style.css Normal file
View File

@ -0,0 +1,46 @@
a, a:visited { color: #444; }
.big h1 { font-size: 10em; }
.withlogo {
background: url(logo_ctdo.png) no-repeat;
background-position-x: right;
background-position-y: bottom;
}
.start strong {
font-weight: normal;
font-size: 0.3em;
position: absolute;
right: 140px;
}
.sources li a { font-size: 90%; }
.remindseverything em { font-size: 50%; }
pre, code { font-family: 'Inconsolata', monospace; }
.bow-parent {
color: white;
background-color: black;
}
.smallest { font-size: 0.7em; }
.command-colored {
color: white !important;
background-color: green;
padding: 5px;
border-radius: 5px;
}
.cmdlist h1 {
position: absolute;
left: 150px;
top: 250px;
}
.cmdlist ul {
font-size: 2em;
padding-left: 0;
}
.cmdlist ul li { padding: 10px; }
.allcommands h1 {
position: absolute;
left: 250px;
top: 150px;
color: red;
font-size: 20em;
text-shadow: 2px 2px 3px #000;
}