Welcome to the backend repository. This guide outlines how we collaborate using Git, manage our branches, and contribute code efficiently.
We use the following branches:
dev: Active development (CI/CD enabled)main: Stable, reviewed codeprod: Production deployment (CI/CD enabled)
All development happens on feature branches and is eventually merged into dev, then into main and then to prod.
Start by forking the main repository to your own GitHub account.
git clone https://github.com/your-username/your-forked-repo.git
cd your-forked-repogit remote add upstream https://github.com/ThryzenX/Backend.gitAlways start from the latest dev branch in the upstream repository.
git fetch upstream
git checkout -b feature/your-feature-name upstream/devMake your changes, then commit them with a clear message:
git add .
git commit -m "feat: add login endpoint"
git push origin feature/your-feature-name- Go to your forked repository on GitHub.
- Open a pull request from your
feature/*branch to thedevbranch of the main repository. - Once merged Check your changes on development server.
- if everything works fine then create a pr from dev branch to main branch .
Once merged, your changes will be included in the stable codebase.
To stay synced with the main repository:
git fetch upstream
git checkout main
git merge upstream/main
git push origin mainUse clear and conventional commit messages:
feat:for new featuresfix:for bug fixeschore:for general maintenancedocs:for documentationrefactor:for code improvementstest:for adding or updating tests
Example:
git commit -m "feat: implement JWT authentication"- Work is pushed to feature branches and merged into
devthen upon verification on the dev server it will be merged tomain. - Once verified,
mainis merged intoprod - CI/CD automatically deploys
devandprodbranches
Stay consistent, sync regularly, and write clean commits.