# Ship — commit and push current changes The user has finished reviewing and iterating on a section of work. Stage, commit, and push to the Gitea remote. ## Steps 1. **Assess changes.** Run these in parallel: - `git status` — see untracked and modified files - `git diff` and `git diff --cached` — see unstaged and staged changes - `git log --oneline -5` — check recent commit style 2. **Stage files.** Add changed and new files by name. Do NOT use `git add -A` or `git add .` — be explicit to avoid accidentally committing secrets, build artifacts, or files in `.gitignore`. 3. **Draft the commit message.** Follow conventional commits (`feat:`, `fix:`, `refactor:`, `docs:`, `chore:`). Keep it concise — one line summary, optional body if the change is complex. End with: ``` Co-Authored-By: Claude Opus 4.6 ``` 4. **Commit.** Use a HEREDOC for the message: ```bash git commit -m "$(cat <<'EOF' type: summary of changes Co-Authored-By: Claude Opus 4.6 EOF )" ``` 5. **Push.** Push to origin: ```bash git push origin main ``` If the push is rejected (remote has new commits), run `git pull --rebase origin main` first, then push again. 6. **Confirm.** Show the user the commit hash and a one-line summary of what was pushed. ## Safety rules - Never force-push (`--force` / `--force-with-lease`) without explicit user approval - Never commit files matching `.gitignore` patterns - Never commit `.env`, credentials, or secrets — warn the user if any are staged - If there are no changes to commit, tell the user and stop - If the user provided arguments after `/ship`, use them as the commit message summary instead of drafting one