Workflow for development
General Development Workflow
-
Clone the repository
Use the following command to clone the repo:Terminal window git clone <repository-url> -
Create a new branch
Switch to a new branch. Use a clear and descriptive naming convention like:<your-name>/<feature-name> -
Write your code ✨
Make your changes and implement the feature or fix. -
Commit your changes
Follow the Conventional Commits specification for commit messages.
You can install the VSCode extension to help with this:
Conventional Commits Plugin -
Rebase before pushing
Always rebase your branch onto the latestmain
to keep history clean:Terminal window git fetch origingit rebase origin/mainResolve any conflicts manually.
-
Push your branch
Push your changes to the remote:Terminal window git push -
Open a Pull Request
Create a Pull Request on GitHub. Make sure to include a clear title and description. Link related issues if applicable. -
Code Review Process
- Request reviews from at least two team members
- Respond to all comments and make necessary changes
- Make sure all discussions are resolved before merging
- Use GitHub’s suggestion feature for small changes
-
Testing Your Code
- Run all tests locally before submitting PR:
- Make sure your code includes unit tests for new functionality
- Check that code coverage remains high (aim for >80%)
- Test edge cases thoroughly
-
Continuous Integration
- All PRs must pass CI checks before merging
- Fix any failing tests or linting errors immediately
- Look for performance regressions in benchmark tests
🚫 Never use git push -f
unless absolutely necessary and approved.
Force pushing can disrupt team collaboration—use with extreme caution.
Troubleshooting & Tips
-
Resolving Merge Conflicts
When encountering merge conflicts, carefully examine the conflicted files and resolve them manually:Terminal window git status # Check conflicted files# Edit conflict files to resolve conflictsgit add <conflict-file>git rebase --continue -
Discarding Local Changes
If you need to discard uncommitted changes:Terminal window git checkout -- <file> # Discard changes in a single filegit restore <file>git reset --hard # Discard all changes (use with caution) -
Managing Branches
Commands to keep your workspace clean:Terminal window git branch -d <branch-name> # Delete local branches that have been mergedgit fetch --prune # Clean up references to deleted remote branches