The Snake Game Database.
Case: Use PascalCase for classes, methods, and fields; camelCase for local variables.
Database name: SGDB
Commit messages: Follow Conventional Commits (https://www.conventionalcommits.org/en/v1.0.0/)
Commit categories:
feat: work on new featuresfix: bug fixesrefactor: refactoring production code (not tests, build scripts, or docs)style: code style fixestest: testsdocs: documentation (including code documentation)chore: build and project config, miscellaneous
Examples:
feat: add login endpointfix: correct rating calculationdocs: update README
Branch naming: Use <name/feature> format.
Examples: vishesh/auth-login, shane/db-migrations
- Always sync with main before starting!!!
git checkout maingit pull origin main
- Start work on your branch
git checkout -b <name/feature>
- Make changes
git add .git commit -m "feat: describe your change here"git push -u origin <name/feature># only first push
Keep your branch updated with main:
git checkout maingit pull origin maingit checkout <name/feature>git merge main
- Do not commit directly to main.
- Always create a feature branch and work there.
- All changes to main must come through a Pull Request.
If a conflict occurs during merge:
- Open the conflicting file(s) and fix the code manually.
- Stage the resolved file(s):
git add <file> - Commit the merge resolution:
git commit - Push your changes:
git push origin <name/feature>
Open a Pull Request into main when your feature is ready.
At least one reviewer must approve.
Squash & merge to keep history clean.
New branch: git checkout -b <name/feature>
Switch branch: git checkout <branch>
Sync with main:
git checkout maingit pull origin maingit checkout <branch>git merge main
Commit: git commit -m "feat: add X"
Push: git push origin <branch>