git

Prof. Dr. Mirco Schoenfeld

intro

Looking familiar?

intro

changes in your, e.g., data report:

  • updates in the data
  • changes in visualizations
  • modification of text

intro

intro

(Commons 2009)

intro

intro

git graph

Trunk:

Unnamed branch of a file tree under revision control

(Commons 2009)

git graph

Structure:

The structure of the revisions is not a tree (although it is often referred to as the revision tree) but a directed acyclic graph.

(Commons 2009)

git graph

Tag:

A tag assigns a label to a revision (including many files) allowing to directly jump to that revision. Often used to label a specific version of a software.

(Commons 2009)

Check git out

Let’s check git out!

Useful resources:

https://git-scm.com/book/en/v2

(Chacon and Straub 2014)

It’s your turn

task

How can I git started?

OR check out the more playful attempt: https://ohmygit.org/

Advanced git

OR check out the more playful attempt with even more advanced topics on branching https://learngitbranching.js.org/

 

Time: 45 minutes

A tip: Avoiding vim-hell for git commits:

Change the default text editor for commit messages in the git bash before you do anything else:

Windows users:

git config --global core.editor "notepad"

Mac users:

git config --global core.editor “open -e -W -n”

 

https://zxtech.wordpress.com/2020/03/29/setting-textedit-as-default-git-editor/

Task Summary

What were your findings?

What did you learn?

Can you see yourself using that in your
personal projects and daily routine?

git trunks and branches

Branching:

Duplication of an object under version control. Objects can then be modified separately and in parallel so that they become different. These objects are called branches.

(Commons 2009)

git trunks and branches

Merge:

A fundamental operation that reconciles multiple changes made to a version- controlled collection of files. Necessary when files are modified on two independent branches. The result is a single collection of files that contains both sets of changes.

(Commons 2009)

git diff viewer

Meld for Linux: sudo apt install meld

git for collaboration

Git is great for collaboration. For example:

https://gitlab.gnome.org/GNOME/meld/-/project_members

git for collaboration

Merge/Pull requests:

https://gitlab.gnome.org/GNOME/meld/-/merge_requests/119

It’s your turn

Task

  1. How can you use git as a collaboration plattform?
  2. What online platforms host git?
  3. How does git plug into management platforms you know?

Time: 30 minutes

Task Summary

What were your findings?

Can you / Do you use these solutions in your company already?

git and plain text files

What is the most central requirement to efficiently use git?

Use Plain Text Files.

git and plain text files

LZV.NRW (2023)

thanks

References

Chacon, Scott, and Ben Straub. 2014. Pro Git (Second Edition). Apress. https://git-scm.com/book/en/v2.
Commons, Wikimedia. 2009. “Revision Controlled Project Visualization.” 2009. https://commons.wikimedia.org/wiki/File%3aRevision_controlled_project_visualization.svg.
LZV.NRW. 2023. “Interactive Panel of Common File Formats.” 2023. https://www.q-terra.de/lzv/.
Back to Lecture Website