git add ., git add -A, or git add --all. These commands add all changes at once, which can lead to unintended commits and poor commit hygiene. Always add files selectively by specifying individual files or at most a single feature directory (e.g., git add lib/features/authentication/). This ensures you review each change and maintain clean, focused commits.
Ensure to follow these steps before a commit:
- Check if only necessary files are added, avoid staging all files in repository.
- Check if pubspec.yaml version needs to be updated (major, minor, patch)
- Check if CHANGELOG.md exists, and update it if necessary (Ensure date is correct)
- Check if README.md exists, and update it if necessary
- Run
flutter analyzeto ensure no linting errors - Run tests with
flutter testto ensure nothing is broken
[TYPE] feature_name: one line description
Detailed description of the changes (for significant changes only)
- Technical references
- Use case explanation
- Result of the change
- [FIX]: Bug fixes
- [ADD]: New features
- [REM]: Feature removal
- [REF]: Code refactoring without functionality change
- [IMP]: Improvements to existing features
- [MOV]: Code moving without functionality change
- [CLN]: Code cleanup (removing dead code, comments, etc.)
- [UPD]: Update dependencies or data
- [DOC]: Documentation updates
- [TEST]: Test additions or corrections
[FIX] authentication: Reset user state when token expires
[IMP] product_list: Add support for infinite scroll pagination
Technical:
- Implemented pagination using ListView.builder with scroll controller
- Added loading indicator at bottom of list
- Integrated with ProductCubit for state management
- Added error handling for failed page loads
Use case:
- Users need to browse large product catalogs efficiently
- Previous implementation loaded all products at once causing performance issues
Result:
- Improved app performance with lazy loading
- Better UX with smooth scrolling and loading states
- Reduced initial load time from 5s to 0.5s
- Be specific: The one-liner should clearly indicate what changed
- Use present tense: Write "Add feature" not "Added feature"
- Feature/Component name: Always include the affected feature or component name
- Detailed description: For significant changes, include:
- Technical details of the implementation
- The use case or problem being solved
- The result or impact of the change
- Reference issues: Include references to issues or tickets when applicable
- Keep it concise: The one-liner should be less than 72 characters if possible
- Separate commits: Make separate commits for separate concerns
Include detailed descriptions when:
- Making significant changes to functionality
- Implementing complex features
- Making architectural changes
- Fixing complex bugs
- Changes that affect multiple features or screens
- Performance optimizations
- State management changes
- API integration changes
[FIX] user_profile_card: Fix avatar image not loading on iOS
[ADD] custom_button: Add ripple effect animation
[IMP] product_card: Optimize widget rebuild performance
[REF] auth_cubit: Migrate from BLoC to Cubit pattern
[FIX] cart_state: Fix state not persisting after app restart
[ADD] settings_provider: Add theme mode persistence
[FIX] deep_linking: Fix navigation to product details from notification
[ADD] app_router: Add nested navigation for settings flow
[IMP] navigation: Add transition animations between screens
[FIX] user_repository: Handle network timeout errors gracefully
[ADD] cache_manager: Implement offline-first data strategy
[UPD] api_client: Update to use Dio 5.0.0
[IMP] login_screen: Add form validation with real-time feedback
[FIX] product_grid: Fix layout overflow on small screens
[ADD] shimmer_loading: Add skeleton loading states
[IMP] image_cache: Implement cached_network_image for better performance
[REF] product_list: Use ListView.builder instead of ListView
[FIX] memory_leak: Dispose controllers in StatefulWidget
[TEST] auth_cubit: Add unit tests for login flow
[TEST] product_repository: Add integration tests for API calls
[FIX] widget_test: Fix flaky animation tests
[feature_name] short description
[authentication] Login fails with Google Sign-In on Android 14
[product_list] Add support for filtering by category
[checkout] Payment processing error with Stripe integration
[profile] Avatar upload fails for images larger than 5MB
Use only standard GitHub labels for categorization:
- bug: Something isn't working as expected
- enhancement: New feature or improvement request
- documentation: Documentation related issues
- question: General questions or clarifications needed
- duplicate: This issue already exists
- wontfix: Issue that won't be addressed
- help wanted: Extra attention is needed
- good first issue: Good for newcomers
Important: Do not create or use custom labels. Stick to the standard GitHub label types to maintain consistency across the repository.