To maintain a clean and structured development workflow, always create a new branch for each feature or bug fix.
-
Pull the latest changes from
mastergit checkout master git pull origin master
-
Create and switch to a new branch (follow the naming convention)
git checkout -b feat/register-endpoints
-
Make changes and commit (follow the commit message convention)
git add . git commit -m "feat: user registration operations"
-
Push the branch to the remote repository
git push -u origin feat/register-endpoints
- List available branches:
git branch
- Switch to an existing branch:
git checkout feat/basic-database-operations
Use the following conventions when creating branches:
- Features:
feat/<feature-name>(e.g.,feat/register-endpoints) - Bug Fixes:
fix/<bug-description>(e.g.,fix/login-bug) - Refactors:
refactor/<code-structure>(e.g.,refactor/database-schema)
Use the following format for commit messages:
feat: short description of the feature
fix: short description of the fix
refactor: short description of the refactor Examples:
git commit -m "feat: implement user authentication"
git commit -m "fix: resolve login validation issue"
git commit -m "refactor: improve database query performance"