push
Commit all changes and push to remote repository
SKILL.mdskills/push/SKILL.md
GitHubCommit all changes and push them to the remote git repository.
Instructions
Run
git statusto check for any changes (staged or unstaged)If there are no changes, inform the user and stop
If there are changes:
- Run
git diffto see the actual changes - Run
git log --oneline -5to see recent commit style
- Run
Generate or use the provided commit message:
- If the user provided a message via
$ARGUMENTS, use it - Otherwise, analyze the changes and create a concise, descriptive commit message following the repository's style
- Focus on the "why" and "what", not implementation details
- Keep it under 72 characters for the first line
- If the user provided a message via
If there are new files or directories that doesn't require to be pushed, add these to .gitignore
Stage all changes with
git add -ACreate the commit with the message
Push to the remote repository with
git pushConfirm success and show the commit hash. Repo must be clean after the push.
Notes
- Be descriptive but concise in commit messages
- Follow the existing commit message style in the repository
- If the push fails (e.g., need to pull first), inform the user and suggest next steps
- Never use attribution in commit messages