slides v0.1
|
@ -0,0 +1,16 @@
|
|||
!SLIDE center withlogo
|
||||
|
||||
# ende
|
||||
|
||||
### Jan-Erik 'badboy' Rediger \<badboy@ctdo.de\>
|
||||
### git clone http://git.ctdo.de/git/git-vortrag.git
|
||||
### [git-vortrag.git](http://repos.ctdo.de/git/?p=git-vortrag.git;a=summary)
|
||||
|
||||
!SLIDE bullets sources
|
||||
|
||||
# Quellen
|
||||
|
||||
* <http://git-scm.com/>
|
||||
* <https://github.com/>
|
||||
* <http://progit.org/>
|
||||
* <http://www.kernel.org/pub/software/scm/git/docs/>
|
|
@ -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://git.ctdo.de/git/git-vortrag.git
|
|
@ -0,0 +1,60 @@
|
|||
!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 bullets incremental
|
||||
|
||||
# objects
|
||||
|
||||
* die (gepackten) Dateien & Daten
|
||||
* benannt nach der SHA1
|
||||
* ` 32/09658ac8d80bc9726d3a33d77e3dfc5fe6035e`
|
||||
|
||||
!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
|
||||
|
|
@ -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)
|
|
@ -0,0 +1,151 @@
|
|||
!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 "from 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 "from 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 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
|
||||
+from ctdo
|
|
@ -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
|
|
@ -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
|
|
@ -0,0 +1,49 @@
|
|||
!SLIDE commandline incremental
|
||||
|
||||
# Remotes
|
||||
|
||||
$ git clone http://git.ctdo.de/git/git-vortrag.git
|
||||
|
||||
oder nachträglich
|
||||
|
||||
$ git remote add ctdo \
|
||||
http://git.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
|
||||
|
||||
$ git push origin :master
|
|
@ -0,0 +1,20 @@
|
|||
!SLIDE bullets incremental cmdlist
|
||||
|
||||
# git
|
||||
|
||||
* init
|
||||
* clone
|
||||
* add
|
||||
* commit
|
||||
* log
|
||||
* diff
|
||||
* branch
|
||||
* checkout
|
||||
* merge
|
||||
* fetch
|
||||
* pull
|
||||
* push
|
||||
|
||||
!SLIDE center
|
||||
|
||||
# 12 Kommandos.
|
After Width: | Height: | Size: 20 KiB |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 9.2 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 22 KiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 21 KiB |
|
@ -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/)
|
After Width: | Height: | Size: 7.8 KiB |
After Width: | Height: | Size: 3.7 KiB |
After Width: | Height: | Size: 4.5 KiB |
After Width: | Height: | Size: 5.8 KiB |
|
@ -0,0 +1,58 @@
|
|||
!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 center
|
||||
![Linus Torvalds](Linus_Torvalds.jpg)
|
||||
|
||||
!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
|
||||
* verschieden Revisionen auschecken
|
||||
* Branching
|
After Width: | Height: | Size: 54 KiB |
After Width: | Height: | Size: 54 KiB |
After Width: | Height: | Size: 4.4 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 10 KiB |
|
@ -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');
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"name": "git-vortrag",
|
||||
"sections": [
|
||||
{ "section": "intro" },
|
||||
{ "section": "first_steps" },
|
||||
{ "section": "hosting" },
|
||||
{ "section": "ende" }
|
||||
]
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
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; }
|