Commit and Push
Commit the currently staged changes (if any), then push. Do not git add, do not stage untracked
or unstaged files.
Steps
git diff --cached --stat— check what's staged.- Something staged: commit it, following the message rules in the commit
skill (
type: summary, staged only, no-a). - Nothing staged: skip committing — do NOT stage anything. Continue to push anyway (there may be earlier local commits to ship).
- Something staged: commit it, following the message rules in the commit
skill (
git push. If the branch has no upstream,git push -u origin HEAD.- Report what happened: the commit hash + message if one was made (or "nothing to commit"), and the push result — including "already up to date" if nothing was pushed.
Don't
- Don't stage anything (
git add,git commit -a,git commit <path>). - Don't amend, rebase, or force-push.
- Don't touch other branches or open a PR.