Skip to content

Git Commands

ACT provides four git commands that automate common git workflows with conventional commits.

Create a conventional commit for staged changes only.

Terminal window
/act:git:commit

ACT analyzes your staged changes and generates a commit message in the format type(scope): subject:

  • Types: feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert
  • Subject: imperative, present tense, no period, ~50 characters
  • Body: optional, included when details are needed

Example output:

feat(auth): add JWT token refresh logic
Automatically refresh expired tokens before API calls.
Handle refresh failures by redirecting to login.

Create a conventional commit for all changes (staged and unstaged).

Terminal window
/act:git:commit-all

Same behavior as /act:git:commit, but stages everything first. Useful when you want to commit all your work without manually staging files.

Push the current branch to GitHub and create a pull request.

Terminal window
/act:git:push-make-pr

This command:

  1. Checks for uncommitted changes — warns you if there are unstaged changes
  2. Pushes the branchgit push -u origin <branch-name>
  3. Checks for existing PR — warns if a PR already exists for this branch
  4. Finds a matching plan — looks for a plan file in ai_specs/ that matches the branch changes
  5. Generates PR content:
    • If a matching plan is found: uses the plan’s overview as title, includes the full plan as PR body
    • If no plan found: generates title and summary from git history and diff
  6. Creates the PR — using gh pr create

PR title rules: max 100 characters, action-oriented (Add/Fix/Update/Refactor).

Switch to the main branch and pull the latest changes.

Terminal window
/act:git:switch-main-pull

Runs:

Terminal window
git switch main && git pull

Use this to get back to a clean main branch after finishing a feature.

Terminal window
# 1. Work on your feature
/act:workflow:work ai_specs/feature-plan.md
# 2. If the work command didn't create a PR, do it manually
/act:git:push-make-pr
# 3. After PR is merged, get back to main
/act:git:switch-main-pull