Code Management Service
GitLab - Internal Code management service
All project code must be stored here and remain up-to-date.
📌 Code Management Guidelines
📖 Introduction
This document defines our code management policies and best practices.
We use GitLab for version control, collaboration, and deployment automation.
1️⃣ Git Branch & Naming Conventions
- Each project has its own repository.
- Maintain a
.gitignorefile to exclude unnecessary files. - Use README.md to document project setup, usage, and contribution guidelines.
- Follow our naming convention:
🔗 Git Branch Naming Conventions
2️⃣ Git Commit Guidelines
Consistent and well-structured commit messages improve collaboration, traceability, and debugging. The Git Commit Guidelines define best practices for writing clear, concise, and meaningful commit messages.
3️⃣ Merge Request (MR) Process
🚫 Do NOT push directly to main or develop.
✅ Create an MR when a feature is complete.
Each MR must include:
- 📌 A clear description
- 👀 Code reviews from at least one developer
Merge Strategy:
🔄 Squash and Merge when appropriate.
GitLab CI: MR Title Validation:
4️⃣ Code Reviews
- 🔍 Every MR must be reviewed before merging.
- ✅ Provide constructive feedback and follow code standards.
- 🏆 Approve only when the code meets all standards.
5️⃣ Handling Secrets & Sensitive Data
🚨 NEVER store credentials, API keys, .env files, or any secrets in the repository!
🔄 If a secret is accidentally committed, rotate it immediately.
🔗 Useful Links
- 📌 Git Branch Naming Conventions
- 🛠️ Git Commands
- ✏️ Git Commit Guidelines
- 🔍 GitLab CI: MR Title Validation
- 🔄 How to Rebase a Local Branch onto Remote Master
🎯 Conclusion
Following these best practices ensures a structured, secure, and efficient codebase.
All team members must adhere to these guidelines for seamless collaboration and high-quality software development.