Feature Branch: A branch created for one specific feature, bug fix, or task. When the work is done and reviewed, it is merged into the main branch and usually deleted.
Example
For ticket PROJ-142, you create feature/PROJ-142-order-filter from main, commit your work there over two days, raise a pull request, and delete the branch after it is merged.
The Feature Branch Workflow
- Pull the latest main branch.
- Create a feature branch for your task.
- Commit your changes on that branch.
- Push the branch and raise a pull request.
- Fix review comments, then the branch is merged and deleted.
Keeping Your Branch Up to Date
While you work, others merge changes into main. If your branch falls far behind, you will get bigger merge conflicts later. Bring main's latest changes into your branch regularly, by merging or rebasing, as your team prefers.
Mistakes to Avoid
- Mixing unrelated changes in one branch, which makes review hard.
- Keeping a branch open for weeks; small, short-lived branches merge more easily.
- Starting a new branch from another unfinished feature branch by mistake.
- Forgetting to delete branches after merging, leaving clutter.
Related terms
- Branch: the general Git concept.
- Main Branch: where feature branches start and end.
- Pull Request (PR): how a feature branch is reviewed.
- Merge Conflict: what happens when branches change the same lines.
Previous term: Expected Stipend | Next term: Feedback
Related guides
- What to Do in Your First Week of an IT Internship
- Build a GitHub Portfolio That Gets You Internship Interviews
- IT Internship Success Guide
Frequently asked questions
What is a feature branch?
A branch created for one feature, fix, or task, which is merged into main after review.
How should I name a feature branch?
Follow your team's convention, often feature/ticket-number-short-description.
How do I keep my feature branch updated with main?
Regularly pull the latest main and merge or rebase it into your branch, as your team prefers.
Should I delete a feature branch after merging?
Yes, usually. Its commits are already in main, and deleting it keeps the repository tidy.
Explore more internship terms
The IT Internship Glossary explains 199 terms you will hear before and during your internship, with simple definitions and real examples.
Browse all 199 terms