0
0
Gitdevops~5 mins

Trunk-based development in Git - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is trunk-based development?
Trunk-based development is a way to work on code where everyone adds their changes directly to one main branch called the trunk or main branch. This helps keep the code simple and up to date.
Click to reveal answer
beginner
Why do teams prefer trunk-based development?
Teams like trunk-based development because it reduces conflicts, makes testing easier, and helps deliver new features faster by keeping all work in one main branch.
Click to reveal answer
intermediate
What is a short-lived feature branch in trunk-based development?
A short-lived feature branch is a small branch created for a quick change or feature. It is merged back into the trunk quickly to avoid long delays and conflicts.
Click to reveal answer
intermediate
How does continuous integration relate to trunk-based development?
Continuous integration means automatically testing and merging code often. It works well with trunk-based development because changes are small and frequent, making problems easier to find and fix.
Click to reveal answer
beginner
What is a common risk if trunk-based development is not followed properly?
If trunk-based development is not followed, big conflicts can happen, code can break often, and it becomes hard to deliver updates quickly.
Click to reveal answer
In trunk-based development, where do developers usually commit their changes?
ADirectly to the main trunk branch
BTo long-lived feature branches
COnly to release branches
DTo personal forks only
What is a key benefit of trunk-based development?
AUses many long-lived branches
BAvoids merge conflicts by merging often
CRequires no testing
DKeeps features hidden for months
Which practice supports trunk-based development best?
ANo code reviews
BManual testing after release
CContinuous integration with automated tests
DWorking in isolation for weeks
How long should feature branches be kept in trunk-based development?
ASeveral months
BOnly after release
CNever merged
DVery short-lived, merged quickly
What happens if many developers work on long-lived branches instead of trunk?
AMore merge conflicts and delays
BFaster delivery
CSimpler codebase
DNo need for testing
Explain trunk-based development and why it helps teams deliver software faster.
Think about how working together on one main branch can make things simpler.
You got /4 concepts.
    Describe how continuous integration supports trunk-based development.
    Consider how testing often helps keep the main branch healthy.
    You got /4 concepts.