git-commit-push

Stage changes, create a conventional commit, and push to origin in one workflow.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "git-commit-push" with this command: npx skills add pc-style/pc-skills/pc-style-pc-skills-git-commit-push

Git Commit and Push

Stage changes, create a conventional commit, and push to origin in one workflow.

When to Use

  • Ready to save changes to GitHub

  • Work is complete and tested

  • Any request to "commit and push" or "save changes"

Workflow

  1. Check Current State

git status git branch --show-current

  1. Review Changes

git diff

or if files already staged:

git diff --staged

  1. Stage Files

Stage all changes:

git add .

Stage specific files:

git add path/to/file1 path/to/file2

Stage by pattern:

git add src/components/*.tsx

  1. Create Conventional Commit

Analyze the diff to determine type and scope:

git commit -m "<type>[optional scope]: <description>"

Types:

  • feat:

  • New feature

  • fix:

  • Bug fix

  • docs:

  • Documentation

  • style:

  • Formatting

  • refactor:

  • Code refactoring

  • perf:

  • Performance

  • test:

  • Tests

  • chore:

  • Maintenance

Examples:

git commit -m "feat(auth): add OAuth2 login flow" git commit -m "fix(api): resolve null pointer exception" git commit -m "docs: update README with setup instructions"

  1. Push to Origin

Push current branch:

git push

First push (set upstream):

git push -u origin HEAD

  1. Verify

git log --oneline -3 git status

Complete Examples

Commit and push all changes:

git add . git commit -m "feat: add dark mode toggle" git push

Commit specific files:

git add src/auth.ts src/middleware.ts git commit -m "feat(auth): implement JWT verification" git push

Commit with body:

git add . git commit -m "feat(search): add elasticsearch integration

  • Configure ES client
  • Add search endpoint
  • Implement result ranking

Closes #234" git push

Git Safety Protocol

  • NEVER commit secrets (.env, credentials)

  • NEVER run git push --force to main/master

  • NEVER use --no-verify unless explicitly asked

  • If commit fails due to hooks, fix issues and create NEW commit

Best Practices

  • Commit related changes together

  • Write clear, imperative commit messages

  • Keep commits atomic (one logical change)

  • Push frequently to back up work

  • Verify CI passes after push

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Automation

generate-agents-md

No summary provided by upstream source.

Repository SourceNeeds Review
General

blog-post

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

code-review

No summary provided by upstream source.

Repository SourceNeeds Review