Understanding Common Practices
Technically, knowing how to use source control is only half the battle. The other half is working as a team player while using source control. The ability to keep your fellow teammates in mind will take you further in your career as you become a considerate and trusted developer.
The following sections are meant as guidelines to help you succeed in working in a team environment. If you work as an individual developer on an open source project, it doesn’t hurt to implement these practices as well.
Rebase when Private, Merge when Public
When working on a feature branch privately, there may be times where multiple commits are necessary. These commits add unnecessary noise to the main
/master
branch.
Rebasing your code takes a number of local commits and updates another branch with a single commit. It essentially rewrites the commit history. Of course, this differs from a merge. Merging is the process of taking all of the commits from one...