{
  "id": "tools",
  "name": "Tools",
  "path": "/tools/",
  "question": "Work from a command",
  "description": "Tool entries keep the input, the exact invocation, and the observable output next to each other. They are written for the moment when a command almost does what you need.",
  "entries": [
    {
      "id": "tools/git-staged-vs-unstaged",
      "title": "Compare Staged and Unstaged Changes in Git",
      "url": "https://www.fieldnotely.xyz/tools/git-staged-vs-unstaged/",
      "summary": "git diff compares the working tree with the index and shows unstaged changes, while git diff --staged compares the index with HEAD and shows exactly what the next commit will contain. Run both, or git diff HEAD for the combined view, when you need the full picture.",
      "aliases": [
        "git diff staged",
        "git diff --cached vs git diff",
        "what will be committed"
      ],
      "kind": "guide",
      "topic": "git",
      "scope": "Git 2.x; working tree, index, and HEAD",
      "updated": "2026-11-29"
    },
    {
      "id": "tools/ripgrep-ignored-files",
      "title": "How ripgrep Handles Ignored Files",
      "url": "https://www.fieldnotely.xyz/tools/ripgrep-ignored-files/",
      "summary": "ripgrep skips paths matched by .gitignore, .ignore, or .rgignore, skips hidden dotfiles, and stops at binary files by default, while grep -r searches all of them. Use rg --files -uu, --no-ignore, --hidden, or -a to find out which filter is hiding the file.",
      "aliases": [
        "rg skips files",
        "ripgrep gitignore",
        "rg no-ignore"
      ],
      "kind": "reference",
      "topic": "ripgrep",
      "scope": "ripgrep 13+; ignore files, hidden files, and binaries",
      "updated": "2026-11-29"
    },
    {
      "id": "tools/jq-missing-fields-null",
      "title": "Missing Fields and null in jq",
      "url": "https://www.fieldnotely.xyz/tools/jq-missing-fields-null/",
      "summary": "jq prints null for an absent key and for a key whose value is JSON null because both serialize the same way, so a plain path lookup cannot tell them apart. Use has(key) or keys to test presence, and remember that the // operator replaces null and false rather than testing whether a key exists.",
      "aliases": [
        "jq has missing key",
        "jq null vs missing",
        "jq has function"
      ],
      "kind": "reference",
      "topic": "jq",
      "scope": "jq 1.6+; JSON objects and arrays",
      "updated": "2026-11-29"
    },
    {
      "id": "tools/validate-etag-with-curl",
      "title": "Validate an ETag with curl",
      "url": "https://www.fieldnotely.xyz/tools/validate-etag-with-curl/",
      "summary": "An ETag check is a conditional GET: store the ETag from the first response, send it in If-None-Match with curl's --etag-compare or -H, and treat a 304 status as proof that the cached copy is still fresh. A 200 status means the validator no longer matches, so the body must be fetched again.",
      "aliases": [
        "curl etag compare",
        "If-None-Match curl",
        "curl 304 check"
      ],
      "kind": "guide",
      "topic": "curl",
      "scope": "curl 7.68+; HTTP/1.1 and HTTP/2",
      "updated": "2026-11-29"
    }
  ]
}
