SuperAPI AI Directory

git-commit-push

Coding & development

View repository

Updated 11-11 22:14

About this skill

Git Commit & Push

Commit & push changes on disk per work unit. Unsaved edits in the editor may not be savable in this environment.

Save

  • If it can be confirmed from the current request or harness state that everything is saved and nothing is unsaved, the save process and re-check are unnecessary.
  • Otherwise, use the save function permitted in the current harness, if any, and confirm normal completion. Do not add extensions or auxiliary scripts.
  • Even if there is no means to save, or if saving fails, is canceled, unsaved changes remain, or completion cannot be confirmed, do not ask for confirmation or stop; continue the Git operations with the content on disk. In the final report, clearly state the save result and the possibility that unsaved edits are not reflected. Do not assume that changes are saved.

Git operations

  1. Check the working directory, current branch, destination remote / upstream, andgit config user.name .
  2. git fetch <remote> と git status -sb to check the sync state and changes. If there are no uncommitted changes, no unpushed commits, and it is not behind, finish with Nothing to commit/push .
  3. If there are uncommitted changes, review the diff, specify the target paths explicitly, and run in the order of git add -- <対象パス>、git diff --cached --check、git commit . Classify multiple PoCs, separate artifacts/tests, and unrelated changes into work units, stage them with explicit paths per scope, and make separate commits.
  4. Immediately before push, re-fetch the destination and check ahead / behind. Resolve behind only with git pull --ff-only when the working tree is clean and fast-forward is possible. If it cannot be resolved, stop and report the situation; do not run rebase, autostash, or history changes without approval.
  5. git push . If rejected, re-check in step 4 and retry only once if it was resolved.
  6. After completion, display the remote repository URL as a Markdown link.

Commit message

Conventional Commits format: <type>(<scope>): <subject> - <user.name>。<user.name> uses the value obtained in step 1.