Introduction
When several developers work on the same project, it becomes essential to set up working conventions. Without clear rules, code can quickly become hard to maintain, conflicts multiply and collaboration becomes inefficient.
Tools like Git and GitHub make it possible to version code and make collaboration easier. However, their effectiveness depends heavily on the conventions adopted by the team.
In this article, we will look at good practices for organizing teamwork with Git and GitHub.
1. Structure the project's branches
A good branch organization is essential to avoid conflicts and keep a project clean.
A commonly used structure is the following:
- main: contains the stable version of the project
- develop: main development branch
- feature/*: new features
- fix/*: bug fixes
- hotfix/*: urgent fixes in production
Example:
feature/authentication-system fix/login-validation hotfix/security-patch
Each feature or fix should be developed in a dedicated branch.
2. Write clear, structured commits
Commits are the history of the project. A good commit should be short, clear and precise.
Good practice:
- write messages in English
- use an action verb
- be precise about the change
Examples of good commits:
feat: add user authentication system fix: correct password validation bug refactor: optimize database queries docs: update installation guide
Recommended structure:
type: description
Most commonly used types:
- feat: new feature
- fix: bug fix
- refactor: code improvement without changing behavior
- docs: documentation
- style: visual changes to the code
- test: adding or changing tests
3. Commit often
A commit should represent a single logical change.
❌ Bad practice:
update project
✅ Good practice:
feat: add login API endpoint fix: handle email validation error
This makes it easier to:
- understand the history
- track down errors
- collaborate between developers
4. Use Pull Requests
Before merging code into the main branch, it is recommended to use a Pull Request on GitHub.
A Pull Request makes it possible to:
- review the code
- discuss the changes
- catch mistakes
- improve the overall quality of the project
Good practice:
- add a clear description
- explain the problem solved
- point out the important changes
5. Avoid code conflicts
Conflicts appear when several developers change the same lines of code.
To avoid them:
- sync regularly with the main branch
git pull origin develop
- work on separate branches
- commit often
6. Follow code conventions
In addition to Git conventions, the team should adopt:
- a shared code style
- a linter
- an automatic formatter
For example:
- ESLint for JavaScript
- PHP-CS-Fixer for PHP
- Prettier for formatting
This keeps the code clean and consistent.
Conclusion
Git and GitHub are powerful tools for collaborative development. However, their effectiveness depends heavily on the conventions adopted by the team.
By applying simple rules such as:
- good branch management
- clear commit messages
- the use of Pull Requests
- regular commits
it becomes much easier to work effectively with several people on a project.
A good organization not only improves code quality, but also makes collaboration smoother and more productive.

