Repository navigation
BEST_PRACTICES
This guide covers recommended workflows and best practices for using GitHub Commander effectively.
Why: Small, frequent commits make it easier to:
- Track changes
- Revert mistakes
- Understand history
- Collaborate with others
How:
- Commit after each logical change
- Don't wait until "it's perfect"
- Use descriptive commit messages
Good Examples:
- "Add user authentication feature"
- "Fix login bug with special characters"
- "Update dependencies to latest versions"
Bad Examples:
- "update files"
- "fix stuff"
- "wip"
Format: Consider using conventional commits:
-
feat:- New feature -
fix:- Bug fix -
docs:- Documentation changes -
style:- Code style changes -
refactor:- Code refactoring -
test:- Adding tests -
chore:- Maintenance tasks
Workflow:
- Create feature branch:
feature/add-login - Work on feature
- Commit changes
- Test thoroughly
- Merge to main
- Delete feature branch
Benefits:
- Isolate changes
- Easy to revert
- Parallel development
- Clean history
Why: Avoid conflicts and ensure you have latest changes.
When: Always before pushing to shared branches.
How:
- Pull latest changes
- Resolve conflicts if any
- Test after merge
- Then push
Naming Conventions:
- Use descriptive names
- Use kebab-case:
my-awesome-project - Avoid special characters
- Keep it concise
Structure:
~/github-projects/
├── personal/
│ ├── website
│ └── scripts
└── work/
├── project-a
└── project-b
Keep repositories clean:
- Remove unused branches
- Archive old projects
- Update README files
- Maintain CHANGELOG
- Remove sensitive data
Guidelines:
- Use descriptive names
- Use lowercase with hyphens
- Avoid spaces
- Include version in binaries
Examples:
-
user-authentication.py✓ -
UserAuthentication.py✗ -
user authentication.py✗
Organize files logically:
project/
├── src/
├── tests/
├── docs/
├── assets/
└── README.md
Handle large files properly:
- Use Git LFS for files > 100 MB
- Compress images before upload
- Use external storage for binaries
- Document where large assets are stored
Create a navigation hierarchy:
- Home/Index page as main navigation
- Link related pages together
- Use consistent heading levels
- Include table of contents
Write clear documentation:
- Use simple language
- Include examples
- Add screenshots where helpful
- Keep it up to date
- Review regularly
Keep wikis current:
- Update when features change
- Remove outdated information
- Review quarterly
- Get feedback from users
Before deploying:
- Test locally
- Review build output
- Check all links
- Verify images load
- Test on multiple browsers
After deploying:
- Test live site
- Check analytics
- Monitor for errors
- Gather user feedback
Optimize for performance:
- Minimize file sizes
- Optimize images
- Use CDN for assets
- Enable caching
- Minify CSS/JS
Plan your content:
- Create content calendar
- Write for your audience
- Use clear headings
- Include call-to-actions
- Update regularly
Follow semantic versioning:
- MAJOR.MINOR.PATCH (e.g., 1.2.3)
- Increment MAJOR for breaking changes
- Increment MINOR for new features
- Increment PATCH for bug fixes
Example progression:
- 1.0.0 → 1.0.1 → 1.1.0 → 2.0.0
Before publishing:
- Write comprehensive documentation
- Include usage examples
- Add tests
- Update README
- Verify dependencies
- Check for security issues
Checklist before release:
- Update version number
- Update CHANGELOG
- Run all tests
- Update documentation
- Tag the release
- Create GitHub release
- Publish package
- Announce to users
Secure your GitHub token:
- Never share your token
- Don't commit tokens to repositories
- Use short expiration periods (30-90 days)
- Rotate tokens regularly
- Revoke unused tokens
Never commit:
- API keys
- Passwords
- Certificates
- Personal information
- Configuration secrets
Use instead:
- Environment variables
- Secret management tools
- .env files (in .gitignore)
- Encrypted secrets
Manage permissions:
- Review collaborators regularly
- Use least privilege principle
- Enable 2FA on GitHub
- Review third-party access
- Audit repository access
Before merging:
- Request code reviews
- Address feedback
- Test changes
- Update documentation
- Communicate changes
Keep team informed:
- Use clear commit messages
- Write descriptive PRs
- Update issue trackers
- Document breaking changes
- Announce major updates
Handle conflicts gracefully:
- Communicate before making changes
- Use feature branches
- Resolve conflicts promptly
- Test after merging
- Keep main stable
Backup strategy:
- Export configuration regularly
- Backup important repositories
- Keep offline copies
- Document backup process
- Test restore procedure
Plan for failures:
- Have offline copies
- Document recovery steps
- Keep contact information
- Test recovery process
- Learn from incidents
Keep GitHub Commander fast:
- Close unused tabs
- Clear cache periodically
- Don't overload with large files
- Keep repositories manageable
- Update regularly
Optimize your workflow:
- Learn keyboard shortcuts
- Use batch operations
- Automate repetitive tasks
- Customize settings
- Use templates
Stay updated:
- Read documentation
- Follow best practices
- Learn from others
- Attend workshops
- Share knowledge
Provide feedback:
- Report bugs
- Suggest features
- Share use cases
- Help others
- Contribute to project
When starting a new project:
-
Setup:
- Create repository
- Initialize with README
- Add .gitignore
- Choose license
- Configure settings
-
Development:
- Create feature branch
- Set up development environment
- Write initial code
- Add tests
- Document setup
-
Collaboration:
- Add collaborators
- Set up branch protection
- Configure CI/CD
- Create project board
- Define workflow
-
Documentation:
- Write README
- Create wiki
- Add examples
- Document API
- Create guides
-
Release:
- Tag version
- Create release
- Publish package
- Announce
- Monitor feedback