1.9 KiB
1.9 KiB
| sidebar_position | title |
|---|---|
| 4 | Reference & Troubleshooting |
Reference & Troubleshooting
Quick Reference
For experienced developers, here is the full sequence of commands in order:
# Get latest dev
git checkout dev
git pull
# Create and switch to feature branch
git checkout -b feature/<task_number>
# ... do your work, commit as you go ...
# Get latest dev again before rebasing
git checkout dev
git pull
# Switch back to feature branch and rebase
git checkout feature/<task_number>
git rebase dev
# Merge into dev
git checkout dev
git merge feature/<task_number>
# Push both branches
git push origin dev
git push origin feature/<task_number>
Then go to Gitea: copy the merge commit hash from the top of dev, post it on the task with a description, and stop the timer.
Branch Naming Reference
| Type | Format | Example |
|---|---|---|
| Development branch | dev |
dev |
| Feature branch | feature/<task_number> |
feature/42 |
Common Mistakes to Avoid
| Mistake | Why it is a problem |
|---|---|
Branching off dev without pulling first |
Your feature branch starts from stale code, causing conflicts later |
Skipping the second git pull before rebasing |
You rebase on an outdated dev and miss changes from teammates |
| Forgetting to rebase before merging | Produces a messy history with unnecessary intermediate merge commits |
Pushing only dev and not the feature branch |
The feature branch on remote becomes out of sync |
Pushing only the feature branch and not dev |
Your work never reaches the team |
| Not posting the commit hash on the task | The task has no traceable link to the code that implements it |