Software Modelling & git
TI3115TU -- 2024-09-17Who has mocked around with git?
Who had issues?
Any questions?
Today
Homework
1. Authentication
What's the default branch?
What is the HEAD pointing at?
How many working trees are accessible?
2. Adding commits
Working tree - staging - commit
Authorship and authentication
git - branching
Way to seperate prallel actions
branching strategies
Using branches to support team's workflow
There is no "standard"-way
branching strategies
Conventions: project specific, agreed-upon standrads
branching strategies: how to pick
Emma Westby: "determine release strategy first!"
Mark: "Pick the simplest one. Adapt if needed"
branching strategies: mainline development
branching strategies: mainline development
branching strategies: mainline development
Downsides?
Breaking changes introduce non-working trunk
Requires "always integrate" approach
Requires high level of trust
branching strategies: mainline development
Advantages?
Breaking fast and early
Small changes
Facilitates continous deployment
branching strategies: feature branches
branching strategies: feature branches
Downsides?
Maintainance overhead if not merged quickly
branching strategies: feature branches
Advantages?
Allows more experimental features
Facilitates peer review based worflow
branching strategies: state branching

Branching strategy → Workflow
e.g. GitHub Workflow
Workflow → Development Process
e.g. Extreme Programming (XP)
Feature branches
Peer review
Pull/Merge requests
Conventions: project specific, agreed-upon standrads
Never universal → Negotiation
Each project adapts conventions
<type>[optional scope]: <description>
[optional body]
[optional footer(s)]
EXAMPLE:
feat(api)!: send an email customer when product is shipped
Source code conventions
Automatic Quality Control
→ Adequate code reviews
Use conventions and tools to minimize 2 and 3!
Focus on 1 and 4
Using tools allows us to focus on more important stuff
"A style guide is about consistency"
"A style guide is about consistency"
Use a tool instead!
Adding meta-information to repository
Here: Development environment configuration
Later (DevOps): Infrastructure, testing and deployment configuration
Good conventions support automation
Bad conventions introduce opinions and conflict
Code review should have a mutual benefit
Missing in the above: a senior needs to learn how team members think and feel