If you are writing automation that touches a git repo then porcelain is the polite way to ask for machine readable status without the drama. Porcelain output is compact and stable so your scripts do not have to guess which human friendly phrase will change next week.
Porcelain is a stab at consistency for programmatic parsing. The simple version prints two status flags then a path. The first column is the staged state and the second column is the work tree state. That tiny format avoids the usual noise you get when humans try to describe a tree and think color is an API.
git status --porcelain
# example lines
M src/app.py
A src/new.py
?? README.md
# for scripting use the safer variant
git status --porcelain=v2 -z
Porcelain v2 was designed for tooling not poetry. It gives more predictable fields and separate records for complex events like renames and copies. When filenames contain spaces or newlines the old approach becomes a fragile mess. Using the null terminated form solves that problem and keeps your automation from crying on weird filenames.
git status --porcelain=v2 -z
and split on the NUL character.In short, treat porcelain as a stable API for status output. Give your scripts predictable input and they will repay you by failing less dramatically at 3 AM. Also consider a cup of coffee for the human who still wants pretty summaries and color.
I know how you can get Azure Certified, Google Cloud Certified and AWS Certified. It's a cool certification exam simulator site called certificationexams.pro. Check it out, and tell them Cameron sent ya!
This is a dedicated watch page for a single video.