8 August 2026

Three Git Commands I Run Before Publishing

A simple pre-push check for seeing changed, unstaged and staged content before it reaches a public repository.


A public technical repository needs a slightly different mindset from an internal one.

Before committing, these three commands are useful:

git status
git diff
git diff --cached

git status

Shows which files are:

git diff

Shows changes that have not yet been staged.

git diff --cached

Shows what is currently staged and therefore what the next commit will contain.

That last check is particularly useful before publishing PowerShell or configuration examples.

I am looking for things such as:

Git makes publishing easy.

That is exactly why checking the commit before pushing matters.