Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision

Target

Select target project
  • sc/edu/git-seminar
  • mk21womu/git-seminar
2 results
Select Git revision
Show changes
Commits on Source (159)
img/git-remote-contributor.svg
img/git-remote-maintainer.svg
img/git-remote-solo.svg
img/license-chooser.svg
img/motivation-structure.svg
img/motivation-throwaway-playground.svg
img/rdm-use-case-data.svg
img/rdm-use-cases-a.svg
img/rdm-use-cases-b.svg
img/rdm-use-cases.svg
img/staging-area.svg
paper.html
paper.pdf
*.pdf
img/staging-area-diff.svg
/img/rdm-use-case-merged.svg
[submodule "reveal.js"]
path = reveal.js
url = https://github.com/hakimel/reveal.js.git
[submodule "pandoc-cheat-sheet"]
path = pandoc-cheat-sheet
url = https://github.com/idiv-biodiversity/pandoc-cheat-sheet.git
This diff is collapsed.
SUBDIRS = \
img
$(SUBDIRS):
$(MAKE) -C $@
pandoc-papers.pdf: pandoc-papers.md
pandoc \
-V aspectratio=169 \
-V institute=iDiv \
-V theme=Frankfurt \
-V navigation=horizontal \
-V logo=img/idiv-black-logo.png \
--pdf-engine=xelatex \
-s \
-t beamer \
-o pandoc-papers.pdf \
pandoc-papers.md
rdm.pdf: img rdm.md rdm.yml
pandoc \
--standalone \
--from=markdown+yaml_metadata_block \
--pdf-engine=xelatex \
--template=pandoc-cheat-sheet/cheat-sheet.tex \
-o rdm.pdf \
rdm.yml rdm.md
all: subdirs
clean:
for dir in $(SUBDIRS); do \
$(MAKE) -C $$dir $@; \
done
rm -f rdm.pdf
default: all
subdirs: $(SUBDIRS)
.PHONY: \
$(SUBDIRS) \
all \
clean \
default \
subdirs
# The Official iDiv git Seminars
## Usage
To view the presentations locally, you need to clone the repository
recursively, to also get a copy of [reveal.js][]:
```bash
git clone --recursive https://git.idiv.de/sc/edu/git-seminar.git
```
Then you also need to create the images from the [graphviz dot
sources][graphviz]:
```bash
cd git-seminar
make
```
Then you can view the presentations, e.g. the basics:
```
firefox basics.html
```
## Attribution
- git logo by [Jason Long](https://twitter.com/jasonlong)
[graphviz]: http://www.graphviz.org/
[reveal.js]: https://revealjs.com/#/
# regular FAQ
- 10-12 git integration RStudio / VS Code / others
- 13-15 GitLab / GitHub project setup / importing existing projects / how to start and continue after that, project management, issue management
- 15-16 GitLab / GitHub automation
- 16-18 free for all
# git advanced -- how to maintain a comprehensible history
- when projects get bigger
- show bad example with merge commits
- show git-flow being harmful
- show git-pretty
Advanced git is not about edge use cases, it's all about keeping your history
comprehensible, i.e. understandable.
## trunk based development
- project history, e.g. via `gitk` or `git lol`, should resemble a **tree**
- for this section we're sticking to the tree metaphor
- long-lived branches basically **master** (and **releases**)
- long trunk of tree
- dead branches on lower trunk (old, unmaintained releases), which may also be
cut down in time if support is dropped
- only clean merges (could have been ff)
## final chapter
- consider like backup slides
- show goodies
## resources
- https://barro.github.io/2016/02/a-succesful-git-branching-model-considered-harmful/
- https://stackoverflow.com/questions/14023648/why-does-my-git-history-look-like-a-christmas-tree
- https://i.stack.imgur.com/ZsXT6.png
- https://trunkbaseddevelopment.com
This diff is collapsed.
.logo-wrapper {
position: fixed;
top: inherit;
top: 0;
z-index: 9999;
padding: 10px 10px;
}
.star-wars {
height: 800px;
perspective: 400px;
color: #feda4a;
letter-spacing: 6px;
}
.crawl {
position: relative;
animation: crawl 120s linear;
}
.crawl > .title > h1 {
color: #feda4a;
}
@keyframes crawl {
0% {
top: 0;
transform: rotateX(20deg) translateZ(0);
}
100% {
top: -6000px;
transform: rotateX(25deg) translateZ(-2500px);
}
}
/* Left will inherit from right (so we don't need to duplicate code */
.ribbon {
/* The right and left lasses determine the side we attach our banner to */
position: absolute;
/* Add a bit of padding to give some substance outside the "stitching" */
padding: 2px 0;
/* Set the base colour */
background-color: #a00;
/* Set a gradient: transparent black at the top to almost-transparent black at the bottom */
background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0.00)), to(rgba(0, 0, 0, 0.15)));
background-image: -webkit-linear-gradient(top, rgba(0, 0, 0, 0.00), rgba(0, 0, 0, 0.15));
background-image: -moz-linear-gradient(top, rgba(0, 0, 0, 0.00), rgba(0, 0, 0, 0.15));
background-image: -o-linear-gradient(top, rgba(0, 0, 0, 0.00), rgba(0, 0, 0, 0.15));
background-image: -ms-linear-gradient(top, rgba(0, 0, 0, 0.00), rgba(0, 0, 0, 0.15));
background-image: linear-gradient(top, rgba(0, 0, 0, 0.00), rgba(0, 0, 0, 0.15));
filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,StartColorStr='#000000', EndColorStr='#000000');
/* Add a drop shadow */
-webkit-box-shadow: 0px 2px 3px 0px rgba(0, 0, 0, 0.5);
box-shadow: 0px 2px 3px 0px rgba(0, 0, 0, 0.5);
z-index: 9999;
}
.ribbon a,
.ribbon a:hover {
/* Set the font */
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 13px;
font-weight: 700;
color: white;
/* Set the text properties */
text-decoration: none;
text-shadow: 0 -1px rgba(0,0,0,0.5);
text-align: center;
/* Set the geometry. If you fiddle with these you'll also need to tweak the top and right values in #ribbon. */
width: 200px;
line-height: 20px;
/* Set the layout properties */
display: inline-block;
padding: 2px 0;
/* Add "stitching" effect */
border-width: 1px 0;
border-style: dotted;
border-color: rgba(255,255,255,0.7);
}
.ribbon-wrapper {
width: 150px;
height: 150px;
position: absolute;
overflow: hidden;
top: 0;
z-index: 9999;
}
.ribbon-wrapper.fixed {
position: fixed;
}
.ribbon-wrapper.left {
left: 0;
}
.ribbon-wrapper.right {
right: 0;
}
.ribbon-wrapper.left-bottom {
position: fixed;
top: inherit;
bottom: 0;
left: 0;
}
.ribbon-wrapper.right-bottom {
position: fixed;
top: inherit;
bottom: 0;
right: 0;
}
.ribbon-wrapper.right .ribbon {
top: 42px;
right: -43px;
/* Rotate the banner 45 degrees */
-webkit-transform: rotate(45deg);
-moz-transform: rotate(45deg);
-o-transform: rotate(45deg);
transform: rotate(45deg);
}
.ribbon-wrapper.left .ribbon {
top: 42px;
left: -43px;
/* Rotate the banner -45 degrees */
-webkit-transform: rotate(-45deg);
-moz-transform: rotate(-45deg);
-o-transform: rotate(-45deg);
transform: rotate(-45deg);
}
.ribbon-wrapper.left-bottom .ribbon {
top: 80px;
left: -43px;
/* Rotate the banner -45 degrees */
-webkit-transform: rotate(45deg);
-moz-transform: rotate(45deg);
-o-transform: rotate(45deg);
transform: rotate(45deg);
}
.ribbon-wrapper.right-bottom .ribbon {
top: 80px;
right: -43px;
/* Rotate the banner -45 degrees */
-webkit-transform: rotate(-45deg);
-moz-transform: rotate(-45deg);
-o-transform: rotate(-45deg);
transform: rotate(-45deg);
}
This diff is collapsed.
Prereq
======
- github account
- local git client installation / eigenes notebook mitbringen
- registration to the course
- bonus: your own project without VCS
Basics
======
VCS für mich
------------
### config
### init
### commit
- -am --- alarm am geht nicht mit untracked files
was hat sich nu verändert?
--------------------------
### log
--stat
-p
### diff
- was ändern
- git diff
- git commit -am
### repo / stage / working
- grafik raussuchen
- wofür nutzen
### add / reset / checkout
vcs mit backup
--------------
- github neues projekt --> projekteinbindung: clone / remote add origin foo
- push
- pull
Workflows
=========
branching workflows
-------------------
was sind branches und wofür brauch ich sie? diese frage sollte eindeutig in diesem kapitel erklärt
werden.
### nvie successful git branching model
### multi master
paper with many journals
same paper text - different theme file for page layout, graph layout, etc.
## tips for papers
git diff -w --ignore-blank-lines --word-diff
Your Projects
=============
##### STuff
- explain all collaboration workflows via github
img/18333fig0106-tn.png

19.7 KiB

SOURCES_DOT = $(wildcard *.dot)
default: all
OBJECTS_DOT_SVG = $(SOURCES_DOT:.dot=.svg)
OBJECTS = \
$(OBJECTS_DOT_SVG)
%.svg: %.dot
dot -Tsvg -o $@ $<
$(OBJECTS):
all: $(OBJECTS)
clean:
rm -f $(OBJECTS)
.PHONY: \
all \
clean \
default
img/boy-scout-rule.jpg

49.2 KiB

img/company-logo-small.png

8.74 KiB

img/git-merge-is-bad.png

307 KiB

img/git-pretty.png

675 KiB

digraph {
node [shape = "box", style = "filled, rounded"]
subgraph clusterorigin {
label = "origin"
node [color = orchid]
omain[label = "main"]
}
subgraph clusterlocal {
label = "local"
node [color = orchid]
main[label = "main"]
}
subgraph clusterupstream {
label = "upstream"
node [color = limegreen]
umain[label = "main"]
}
omain -> main [label = "git pull"]
main -> omain [label = "git push", constraint = false]
umain -> main [label = "git pull upstream main", constraint = false]
omain -> umain [label = "pull request (GitHub)\nmerge request (GitLab)", constraint = false]
}
digraph {
node [shape = "box", style = "filled, rounded"]
subgraph clusterorigin {
label = "origin"
node [color = orchid]
omain[label = "main"]
}
subgraph clusterlocal {
label = "local"
node [color = orchid]
main[label = "main"]
}
subgraph clusteralice {
label = "alice"
node [color = limegreen]
amain[label = "main"]
}
subgraph clusterbob {
label = "bob"
node [color = lightskyblue]
bmain[label = "main"]
}
omain -> main [label = "git pull"]
main -> omain [label = "git push", constraint = false]
amain -> main [label = "git pull alice", constraint = false]
bmain -> main [label = "git pull bob", constraint = false]
}