# stefanzweifel/git-auto-commit "nothing to commit, working tree clean"

> Understand stefanzweifel/git-auto-commit reporting "nothing to commit" when no files changed in the working tree.

Source: https://latchkey.dev/learn/github-actions/stefanzweifel-git-auto-commit-nothing-to-commit  
Updated: 2026-06-26

git-auto-commit only commits when there are staged changes. If the prior step produced no diff, the action reports a clean tree and makes no commit, which downstream steps may misread as a failure.

## Diagnose it: is the job queued, or is the runner gone?

A job that never starts and a job whose runner disappeared mid-run look similar in the UI and have opposite causes. The first is a labelling or capacity problem, the second is the runner being killed, usually by memory pressure or a spot reclaim.

```.github/workflows/ci.yml
- name: Runner facts
  run: |
    echo "runner name: $RUNNER_NAME"
    echo "os/arch:     $RUNNER_OS/$RUNNER_ARCH"
    nproc; free -h; df -h /
    echo "labels this job asked for: ${{ toJSON(job) }}"
```

> If the job sits in `queued` and never picks up, no runner matches every label you listed. Labels are ANDed: `runs-on: [self-hosted, linux, gpu]` needs one runner carrying all three, not three runners carrying one each.

## The failures that are not your workflow

- Exit 137 is the kernel out-of-memory killer, not an application error. Check `free -h` above against your peak usage.
- Disk exhaustion presents as unrelated write errors deep in a build. GitHub-hosted runners ship roughly 14 GB of free space, which a Docker-heavy job can exhaust.
- A lost connection to the server on a self-hosted runner is usually the host being reclaimed or rebooted, not a network fault in your job.
- A job that starts and immediately fails with no step output normally failed during runner setup, before your workflow ran at all.

## FAQ

### What causes stefanzweifel/git-auto-commit "nothing to commit, working tree clean"?

There are 2 common causes: generator produced no change and files outside the configured glob. The formatter, codegen, or build step output bytes identical to what is already committed.

### How do I fix stefanzweifel/git-auto-commit "nothing to commit, working tree clean"?

Treat a clean tree as success, and check the file pattern. Confirm the file_pattern matches the paths your step writes.

### What does stefanzweifel/git-auto-commit "nothing to commit, working tree clean" actually mean?

The git-auto-commit step logs "nothing to commit, working tree clean" and no commit is pushed.

### How do I stop stefanzweifel/git-auto-commit "nothing to commit, working tree clean" happening again?

Gate downstream steps on the changes_detected output. The prevention section lists 2 changes that keep it from recurring.

---

Latchkey runs CI/CD that repairs its own failures. Agent entry points: https://latchkey.dev/agent.txt, https://latchkey.dev/openapi.json, https://latchkey.dev/llms.txt
