yaml bash 120 lines · 2 tabs

Git workflows and branching strategies for teams

Ryan Nakamura Feb 2026
2 tabs
# Pre-commit hooks configuration
repos:
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v4.5.0
    hooks:
      - id: trailing-whitespace
      - id: end-of-file-fixer
      - id: check-yaml
      - id: check-json
      - id: check-merge-conflict
      - id: detect-private-key
      - id: no-commit-to-branch
        args: [--branch, main]

  - repo: https://github.com/commitizen-tools/commitizen
    rev: v3.13.0
    hooks:
      - id: commitizen
        stages: [commit-msg]

  - repo: https://github.com/pre-commit/mirrors-eslint
    rev: v8.56.0
    hooks:
      - id: eslint
        files: \.js$
        args: [--fix]

  - repo: https://github.com/pre-commit/mirrors-prettier
    rev: v3.1.0
    hooks:
      - id: prettier
        files: \.(js|ts|json|yaml|yml|md)$
2 files · yaml, bash Explain with highlit

Effective Git workflows enable smooth team collaboration. Git Flow uses main, develop, feature/*, release/*, and hotfix/* branches. GitHub Flow simplifies to main plus short-lived feature branches with pull requests. Trunk-based development commits directly to main with feature flags. Conventional commits (feat:, fix:, chore:) standardize messages for changelog generation. Protected branches require reviews and passing CI. Squash merging keeps history clean. Interactive rebase with git rebase -i cleans up commit history before merging. git bisect finds bug-introducing commits. Cherry-pick transfers specific commits between branches. Pre-commit hooks enforce linting and formatting. Semantic versioning tags mark releases.


Related snips

javascript
// Express app with health checks and graceful shutdown
const express = require('express');
const { createServer } = require('http');

const app = express();
const server = createServer(app);

Container health checks and graceful shutdown patterns

docker kubernetes health-checks
by Ryan Nakamura 1 tab
javascript
// k6 Load Test Configuration
// Run: k6 run load-test.js --env BASE_URL=https://api.example.com

import http from 'k6/http';
import { check, sleep, group } from 'k6';
import { Rate, Trend, Counter } from 'k6/metrics';

Load testing APIs with k6 for performance validation

k6 load-testing performance
by Ryan Nakamura 1 tab
hcl
# Using the module

module "api_service" {
  source = "./modules/ecs_service"

  service_name       = "api"

Terraform modules for reusable infrastructure

terraform modules iac
by Ryan Nakamura 2 tabs
bash
#!/usr/bin/env bash
set -euo pipefail

# ==========================================================
# Production Incident Response Runbook
# ==========================================================

Incident response runbook and diagnostic scripts

incident-response sre production
by Ryan Nakamura 1 tab
bash
#!/usr/bin/env bash
# Docker Networking Modes & Configuration

# === List networks ===
docker network ls
docker network inspect bridge

Docker networking: bridge, host, and overlay networks

docker networking containers
by Ryan Nakamura 1 tab
nginx
# Main nginx.conf

worker_processes auto;
worker_rlimit_nofile 65535;

events {

Nginx reverse proxy and load balancing

nginx reverse-proxy load-balancing
by Ryan Nakamura 1 tab

Share this code

Here's the card — post it anywhere.

Git workflows and branching strategies for teams — share card
Link copied