or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Do you want to remove this version name and description?
Syncing
xxxxxxxxxx
Git masterclass blog post draft
My github handle
samumantha, bast, …
Contributing
Open House notes: https://hackmd.io/@coderefinery/oh_git_masterclass
Please work on any section that sounds interesting to you in this document. Please do not forget to add yourself as an author. Once we have a first full draft we move to Github.
Note that the materials have now been split into two separate blogposts. One more on the organizational side (done, see https://coderefinery.org/blog/open-house-git-masterclass/) and one on the materials and topic collection (help needed; this document).
Rough general todo:
Deadline for first draft is end of January.
Drafting space
+++
title = "Advaced git / git masterclass materials and topic collection"
description = """
Collected materials and topics from our open house session on advaced git / git masterclass on 14.01.25
"""
[extra]
authors = "Samantha Wittke, Radovan Bast, …"
+++
TL;DR
TODO: Write summary
Background
On January 14, 2025, we held an Open House session on "Git masterclass". Educators and practitioners from various institutions and communities came to share resources and discuss topics usually not taught in basic git classes. This blogpost provides an overview of the materials and topics discussed. Please refer to https://coderefinery.org/blog/open-house-git-masterclass/ for an overview of the OpenHouse session itself.
Material we know about
Advanced Git in Carpentries incubator (pre-alpha)
Other incubator projects on intermediate and advanced Git
Git - beyond the basics
Heidelberg University material for intermediate/expert Git courses
e-Science Center
Collaborative version control with Git and GitHub
CodeRefinery
git init
anymore: https://coderefinery.org/blog/2024/04/19/git-lesson-rewrite/)Git and GitHub through GitKraken : From Zero to Hero
University of Sheffield - Git Collaboration
KIT - Intermediate git
Mostly CodeRefinery material, but with some additions:
zedif Jena - Collaborative Version Control with Git: An Advanced Workshop
Basic GitHub but including pull requests and branching
Met Office Resources - Custom Software Carpentry Lessons
Other resources
A list of other resources that can be helpful when learning about or teaching git:
Topic collection
Recovering from local mistakes
Changing history
How to modify an open pull request/ merge request - responding to code review with changes (rebase, squash, edit commits)
How to remove something from the history
git revert
and how it doesn't actually remove from hisotry. Removing from history completely can be done using BFG-repo-cleaner.Interactive rebase to squash/delete/re-order commits
Creating clearer history while working
Temporary work and stashing
Atomic commits, using
git commit --amend
andgit commit --fixup
which provide a gentle introduction togit rebase -i
(see above) | +3History inspection
Collaborative workflows
Combining changes
git merge
orgit rebase
and explain why and when you might prefer one of the other. Both can result in conflicts though!User interfaces and experience
.gitconfig
includeIf
to have custom configuration based on directory path.aliases
conflictstyle = diff3
under[merge]
to not only see a conflict but also what the original code was when resolvingdefaultBranch = main
pushDefault = origin
Organizing projects
Suggestion: this topic belongs on a 'RSE/Data Manager track' of git training, separate from a 'researcher/user track' that focuses more on daily usage, recipes etc - 'history' & 'recovering' sections.
Best practices:
These best practices could be served by e.g. blog posts disseminated via community forums, but they probably don't need to be part of a formal course.
Resources:
Acknowledgement
This collection and overview was developed collaboratively during the OpenHouse session. Thanks goes out to all participants: Radovan Bast, Lukas C. Bossert, Richard Darst, Nishka Dasgupta, Jonathan Hartman, Marc-André Hermanns, Diana Iusan, Dominic Kempf, Christian Knüpfer, Michele Mesiti, Iva Momcheva, Joe Marsh Rossney, Neil Shepard, Jannetta Steyn, Dimitrios Theodorakis.
Outlook
In this Open House session, we looked back: we shared experiences and links to already existing materials. We also preliminary identified topics of interest to the community based on previous experiences.
For the next session, we aim to look into the future: What lessons are missing, where do we put them and how do we collaborate on something useful for the community to mix and match as needed. If you want to be part of this discussion, please contact support@coderefinery.org.