- Maintain one repository per product or microservice
- Assign read, write, or admin roles to teams or individuals
- Protect the main branch with branch protection rules in your SCM
Standard Git Workflow
A consistent workflow ensures that developers can work in parallel without destabilizing the main codebase. Below is a step-by-step guide using Git commands:- Clone the repository
- Create a feature branch
- Develop and test locally
- Make code changes in your IDE
- Run unit tests or integration tests
- Commit your changes
- Push your branch to the remote
Use clear, descriptive branch names (e.g.,
feature/payment-api) to make pull request reviews and CI/CD tracking easier.
Key SCM Terms
Below is a quick reference table for essential Git concepts you’ll encounter in Jenkins pipelines and code reviews:Never push directly to the protected
main branch. Always open a pull request to enforce code reviews, automated testing, and compliance checks.