1.7 KiB
1.7 KiB
| sidebar_position | title |
|---|---|
| 2 | Development & Rebasing |
Development & Rebasing
Step 5 — Work on the Task
- Implement the changes required by the task on your feature branch.
- Commit your work as you go with clear, descriptive commit messages:
git add .
git commit -m "#<task_number> - Short description of what was done"
For example:
git commit -m "#42 - Add stock export to Excel functionality"
You may have as many commits as needed on your feature branch.
Step 6 — Update dev Again Before Rebasing
Before rebasing, fetch the latest changes from remote so your rebase is based on the most current state of dev:
git checkout dev
git pull
This step is important. If another developer pushed to
devwhile you were working, you need those changes before you rebase, otherwise you may introduce conflicts or overwrite work.
Step 7 — Switch Back to Your Feature Branch
git checkout feature/<task_number>
Step 8 — Rebase the Feature Branch onto dev
git rebase dev
This replays your commits on top of the latest dev, as if you had started your work from the current state of the branch. The result is a clean, linear history with no unnecessary merge commits from intermediate states.
If conflicts arise during the rebase:
- Git will pause and show which files have conflicts.
- Open the conflicting files, resolve the conflicts manually.
- Stage the resolved files:
git add <file>
- Continue the rebase:
git rebase --continue
- Repeat until the rebase completes.
If you need to abort and start over:
git rebase --abort