What The Commit API
Fetch a random, painfully relatable git commit message as plain text with one curl. No key, no JSON parsing, no dependencies. Verified example response included.
Endpoint tested and returned HTTP 200 on 2026-08-21
What is the What The Commit API?
What The Commit serves random joke git commit messages. `GET https://whatthecommit.com/index.txt` returns a single message as plain text with no key, no wrapper and no JSON, which makes it trivial to pipe straight into `git commit -m`.
This is the smallest useful API in the directory: one request, one line of text, no schema. That constraint is the point. Because `/index.txt` returns bare text rather than JSON, you can wire it into a shell alias with nothing but curl and command substitution, which is why it has survived in developers' dotfiles for well over a decade.
It is also a neat teaching example for the difference between a resource and its representation. The site root returns an HTML page for humans; `/index.txt` returns the same underlying value as `text/plain` for machines. Same data, two representations, chosen by path rather than by an `Accept` header, which is a pragmatic older convention you will still meet in the wild.
Quick facts
- Base URL
https://whatthecommit.com- Authentication
- No key and no headers required. A polite User-Agent is still good manners.
- Rate limit
- Not published. It is a single small server, so do not poll it in a loop.
- Pricing
- Free and open source.
- CORS
- Enabled — callable directly from browser JavaScript
- Official docs
- Read the docs
How to use the What The Commit API
Every request below was executed against the live API on 2026-08-21, and the response shown is the real body it returned — not an illustration.
1. Fetch a random commit message as plain text
GET https://whatthecommit.com/index.txt
curl 'https://whatthecommit.com/index.txt'const res = await fetch("https://whatthecommit.com/index.txt");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);import requests
res = requests.get("https://whatthecommit.com/index.txt", timeout=20)
res.raise_for_status()
print(res.json())I expected something different.Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
(none) | n/a | Optional | There are no parameters. `/index.txt` gives plain text; the bare domain gives an HTML page. /index.txt |
Response fields
(body)text/plain- A single commit message, sometimes containing parenthetical asides such as `(this commit has no parents)`. There is no trailing newline guarantee, so trim before use.
What you can build with the What The Commit API
- Add a `git yolo` shell alias that commits with a random message
- Populate a demo repository with plausible-looking history for a screenshot
- Use as the world's simplest live endpoint when demonstrating curl, fetch or an HTTP library
- Generate placeholder strings for a UI that displays commit history
- Health-check a proxy or firewall rule with a response small enough to read at a glance
Common errors and how to fix them
HTML instead of text
You requested the site root rather than `/index.txt`.
Fix: Always include the `/index.txt` path when scripting.
Connection refused or 5xx
The single origin server is down or overloaded.
Fix: Fall back to a local message list; this is a joke endpoint and should never be on a critical path.
Messages containing quotes or apostrophes
Not an HTTP error, but shell-quoting breaks if you interpolate the result unquoted.
Fix: Wrap the substitution in double quotes: `git commit -m "$(curl -s https://whatthecommit.com/index.txt)"`.
What The Commit API — frequently asked questions
Does What The Commit need an API key?
No. It is a plain public URL with no key, no account and no headers required.
Does it return JSON?
`/index.txt` returns plain text, which is the point. If you need JSON, wrap the string yourself; there is nothing else in the response to model.
Are the messages safe for work?
Mostly, but the corpus is community-contributed and a few entries include mild profanity. Filter the output if it will appear in front of clients.
Can I use it in CI?
You can, but do not make a build depend on an external joke service. Cache a list of messages locally and pull fresh ones occasionally instead.
Tools that pair with this API
Random Text Generator
Generate random strings with custom length and character sets, or random words from a built-in list. Great for test data, IDs and placeholders.
Random String Generator
Generate random strings with a custom length and character sets — uppercase, lowercase, digits and symbols. Create many at once with secure randomness.
.gitignore Generator
Build a .gitignore file by selecting your stack — Node, Python, Java, Go, Rust, Unity, macOS, Windows, IDEs — merged, de-duplicated and ready to download.
What The Commit is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 2026-08-21; always check the official documentation before relying on this API in production, as terms and limits can change.