Practical tools for system, network, security, and operations administrators.

CLD-C0113 · CI/CD, Git & GitOps

Git Cheat Sheet

Keep a short Git command list. Do not run a rewrite, and do not force-push.

Updated 25 October 2026 · Cheat Sheet

This is an original planning guide. It is not a vendor manual, an official standard, or legal advice. Example addresses use documentation ranges. Review every command before you paste it.

What this hour is for

Git Cheat Sheet drafts one command. Do not force-push. Do not reset a branch you have pushed. Do not rewrite history during the reading. A command that prints a secret is a line you do not run.

Write the account, project, or repository you administer, the name of this change, and the time. A second change waits until this line has been read back.

The browser tool drafts text or reads a paste you already hold. It does not log in, it does not scan, and it does not apply.

192.0.2.10/24, gateway 192.0.2.1, 198.51.100.0/24, 203.0.113.0/24, and 2001:db8::/32 are documentation. example.com is a documentation name. A sample password is replaced.

The change you can finish

Apply nothing while you are writing the note. When the lab window opens, it is one change on the account named in the ticket. Read the draft, then the account, then decide.

Rollback is the previous file, the previous plan, or the lab resource you can delete because it was only a lab.

  1. Write the repository you administer.
  2. Draft one command.
  3. Reject force-push and a hard reset of a shared branch.
  4. Do not run it during the reading.
  5. Stop.

Mistakes that outlive the statement

Git Cheat Sheet goes wrong in a small set of ways. The list is here so the ticket can forbid them before the window.

Decisions to write down

One decision for Git Cheat Sheet: The repository is yours. The command was read. Nothing runs during the reading. Shared history stays. And one command is enough.

Checks before you call it done

Confirm this before you call the change done: The repository is written. Nothing was run. No force-push was used. No reset of a shared branch. And no secret is in the note. If one of those fails, stop.

# Git command draft. Do not run it during the reading.
# Do not force-push.

Before you leave the account

Git Cheat Sheet ends when the account in the note is the account in the ticket. If it is not, stop.

The draft stays a draft until a person has read the names in it. A generator does not log in, does not apply, and does not scan.

192.0.2.10/24, gateway 192.0.2.1, 198.51.100.0/24, 203.0.113.0/24, and 2001:db8::/32 are documentation. example.com is a documentation name. A sample password is replaced. It is not a password you keep. 10.0.0.0/16 is a sample prefix, not a network you publish unless you already use it.

prompt-for-this is a reminder that a secret is missing. It is not an access key, a token, or a password you save. An Azure secret draft may contain a sample password. Replace it. Do not file it.

One change is the window. If two things move and the result is wrong, you will not know which one did it.

If the same step fails twice, stop for the day. Restore the copy you took first.

A second person reads the account and the change aloud. If they cannot find them in the ticket, the note is not done.

This page is a planning guide. It is not a vendor manual, not an official standard, not legal advice, and not an audit opinion. You do not apply it against an account you do not administer.

Tools for this guide

These tools run in the browser on this site. They do not log into your machines.

More in this cluster

The pillar for this page, and the next published pages filed with it.