Record staged changes
low risk
Creates a commit from the index. See the flags and examples below, and run `man git` for the full reference.
| Flag | Meaning |
|---|---|
-m | Message |
--amend --amend | Rewrite the last commit⚠ Changes history; don’t amend pushed commits. |
-a | Stage tracked changes automatically |
--no-verify --no-verify | Skip hooks⚠ Bypasses safety checks. |
git commit -m "Fix login redirect"Commit · explain & risk-check →git commit --amend --no-editAdd to the last commit · explain & risk-check →Reference text is hand-written and may be incomplete — check man git for your version. Test destructive commands on a non-production system first.