🧙♂️ Branch Like a Wizard: GitHub PR Sorcery 101
Welcome to the enchanted forest of GitHub, where every branch is a path, and every pull request (PR) is a summoning ritual. Here’s how to avoid conjuring chaos and keep your repo realm pristine.
🌱 Branches: Not Just for Trees
Treat your repo like a magical kingdom. You wouldn’t build your dragon stable in the throne room, right? Same goes for your code. Use branches to separate your experiments, fixes, and glorious new features.
✨ The Five Sacred Branch Types:
🧪 Branch Type | 🏷️ Example | 🔮 Purpose | 🛡️ PR Requirements |
---|---|---|---|
Main | main |
Sacred source of truth (prod) | Must be peer-reviewed & tested by CI elders |
Feature | feature/frog-translator |
New magic spell (feature) | Describe it well, include test scrolls |
Bugfix | bugfix/unicorn-glitch |
Patch a wild bug | Show your work: bug ref + how to summon it |
Hotfix | hotfix/melted-cauldron |
Urgent fix (prod on fire) | Small, fast, reviewed with haste |
Release | release/v3.1.4 |
Prepare for kingdom-wide update | Reviewed, changelog updated, tagged with care |
🧾 The Pull Request Prophecy
Think of a PR like a scroll you send to the council. It must be clear, complete, and convincing. If you send in a blank scroll with a title like “stuff,” expect it to be eaten by the dragons of indifference.
📜 Required PR Runes:
-
🧙 Description: What magic did you perform and why?
-
🪄 Issue Reference: Link the scroll that foretold this change.
-
🧪 Test Plan: Describe the rituals used to verify your work.
-
🎞️ Screenshots/Demos: Visual proof your enchantments work (especially UI).
-
✅ Reviewer Checklist: Guide your reviewer like a map through the mountains.
🧪 Sample PR Template:
## Description
Added Frog-to-English translation in login wizard.
## Fixes
Resolves issue #456
## Type of Change
- [x] Feature
- [ ] Bug Fix
- [ ] Minor Update
- [ ] Major Update
## Test Plan
1. Go to login
2. Select frog mode
3. Expect croaks to be translated into form input
## Screenshots
(Add enchanted frog footage here)
## Reviewer Checklist
- [ ] Code reviewed
- [ ] Tests passed
- [ ] Scrolls (docs) updated
So next time you open a PR, channel your inner mage. Make it clear. Make it tested. And always, always remember: the main branch is sacred ground—don’t walk on it with muddy boots.