Skip to main content

Quick Reference Guide

📚 Essential Commands

Git & GitHub

# Clone repository
git clone https://github.com/Citi-Rippler/starter-template.git

# Create feature branch
git checkout -b feature/your-feature

# Commit changes
git add .
git commit -m "feat: add new feature"

# Push changes
git push origin feature/your-feature

# Update from main
git fetch origin
git rebase origin/main

Node.js

# Install dependencies
npm install

# Run tests
npm test

# Run linter
npm run lint

# Fix linting issues
npm run lint:fix

# Format code
npm run format

# Build project
npm run build

Python

# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate

# Install dependencies
pip install -r requirements.txt

# Run tests
pytest

# Run tests with coverage
pytest --cov

# Lint code
flake8 .

# Format code
black .

# Type checking
mypy .

Java (Maven)

# Install dependencies
mvn install

# Run tests
mvn test

# Build project
mvn package

# Check code style
mvn checkstyle:check

# Clean build
mvn clean install

Java (Gradle)

# Build project
./gradlew build

# Run tests
./gradlew test

# Check code style
./gradlew checkstyleMain

# Clean build
./gradlew clean build

Docker

# Build image
docker build -t my-app .

# Run container
docker run -p 3000:3000 my-app

# Build and run with docker-compose
docker-compose up

# Stop containers
docker-compose down

# View logs
docker-compose logs -f

📋 File Structure Quick Reference

Repository Root

├── .github/
│ ├── workflows/ # CI/CD pipelines
│ ├── ISSUE_TEMPLATE/ # Issue templates
│ ├── PULL_REQUEST_TEMPLATE.md
│ ├── CODEOWNERS # Code ownership
│ ├── SECURITY.md # Security policy
│ └── dependabot.yml # Dependency updates

├── docs/ # Documentation
│ ├── getting-started.md
│ ├── contribution-guide.md
│ ├── architecture.md
│ ├── sync-configuration.md
│ └── template-setup-guide.md

├── scripts/
│ └── sync_all.sh # Manual sync script

├── examples/ # Example configurations
│ ├── nodejs/
│ ├── python/
│ ├── java-maven/
│ ├── java-gradle/
│ └── docker/

├── Configuration Files
│ ├── .editorconfig # Editor settings
│ ├── .prettierrc # JS/TS formatting
│ ├── .eslintrc.json # JS/TS linting
│ ├── .flake8 # Python linting
│ ├── checkstyle.xml # Java code style
│ ├── .gitignore # Git exclusions
│ ├── .dockerignore # Docker exclusions
│ └── .releaserc.json # Semantic release config

└── Project Files
├── README.md
├── CONTRIBUTING.md
├── CODE_OF_CONDUCT.md
├── CHANGELOG.md
└── LICENSE

🔧 Common Workflows

Adding a New Feature

  1. Create branch: git checkout -b feature/feature-name
  2. Make changes
  3. Test locally: npm test / pytest / mvn test
  4. Lint code: npm run lint / flake8 . / mvn checkstyle:check
  5. Commit: git commit -m "feat: add feature"
  6. Push: git push origin feature/feature-name
  7. Create pull request
  8. Wait for CI/CD checks
  9. Request review
  10. Merge after approval

Fixing a Bug

  1. Create branch: git checkout -b fix/bug-description
  2. Write failing test
  3. Fix the bug
  4. Verify test passes
  5. Commit: git commit -m "fix: resolve bug"
  6. Follow steps 6-10 from above

Updating Documentation

  1. Create branch: git checkout -b docs/update-description
  2. Update markdown files
  3. Preview changes
  4. Commit: git commit -m "docs: update documentation"
  5. Push and create PR

🚀 CI/CD Pipeline Status

Understanding Badges

  • 🟢 Passing: All checks succeeded
  • 🔴 Failing: One or more checks failed
  • 🟡 Pending: Checks are running
  • Skipped: Checks were skipped

Common CI/CD Issues

IssueSolution
Build failsCheck syntax errors, missing dependencies
Tests failFix failing tests, update expected values
Linting failsRun npm run lint:fix or format code
Security alertUpdate vulnerable dependencies
Coverage too lowAdd more tests

📝 Commit Message Convention

Format: <type>(<scope>): <description>

Types

  • feat: New feature
  • fix: Bug fix
  • docs: Documentation changes
  • style: Code style (formatting, semicolons)
  • refactor: Code refactoring
  • test: Adding tests
  • chore: Maintenance tasks
  • perf: Performance improvements
  • ci: CI/CD changes

Examples

feat(auth): add OAuth2 authentication
fix(api): resolve null pointer exception
docs(readme): update installation guide
style(code): format with prettier
refactor(utils): simplify helper functions
test(api): add integration tests
chore(deps): update dependencies
perf(query): optimize database query
ci(workflow): add caching to build

🔐 Security Best Practices

  • Never commit secrets or API keys
  • Use environment variables for sensitive data
  • Keep dependencies updated (Dependabot helps)
  • Review security alerts promptly
  • Use branch protection rules
  • Require code reviews
  • Enable 2FA on GitHub account
  • Use SSH keys for Git operations

🆘 Getting Help

Quick Help

  • Check documentation in docs/
  • Search existing issues
  • Review workflow logs in Actions tab

Need More Help?

  1. Open an issue
  2. Check GitHub Discussions
  3. Contact maintainers
  4. Review contribution guide

Documentation

External Resources

💡 Pro Tips

  1. Use aliases: Create Git aliases for common commands
  2. Pre-commit hooks: Set up pre-commit hooks for linting
  3. IDE extensions: Install ESLint, Prettier extensions
  4. Keyboard shortcuts: Learn GitHub keyboard shortcuts (? on GitHub)
  5. Watch repository: Stay updated with repository changes
  6. Star repository: Bookmark important repositories
  7. Draft PRs: Use draft PRs for work in progress

📊 Maintenance Schedule

Daily

  • Monitor CI/CD failures
  • Review new issues and PRs
  • Check security alerts

Weekly

  • Review Dependabot PRs
  • Update documentation
  • Clean up stale branches

Monthly

  • Review and update workflows
  • Check dependency updates
  • Update examples
  • Review analytics

Quarterly

  • Major version updates
  • Architecture review
  • Performance audit
  • Security audit

Need more details? Check the complete documentation.