SuperAPI AI Directory

git-onboarding-workflow

Office & productivity

View repository

Updated 10-15 19:52

About this skill

GitHub Flow Workflow Guide

Analyzes the current git status and guides you through the next steps.

Status Collection

Run the following 3 commands:

  1. git branch --show-current — current branch
  2. git status --short — working tree status
  3. git log @{u}.. --oneline 2>/dev/null — unpushed commits (empty result if there is no upstream)

Guidance by Status

Analyze the results and provide guidance for the applicable situation among the 5 below:

1. main branch, no changes

You are ready to start new work.

git checkout -b feat/<기능명>

For the branch name, use a conventional prefix such as feat/, fix/, chore/ .

2. main branch, has changes

There are changes made directly on main. Move them to a feature branch.

git stash
git checkout -b feat/<기능명>
git stash pop

3. feature branch, has uncommitted changes

Commit your work.

git add <파일들>
git commit -m "feat: 변경 내용 설명"

Follow the conventional commits format for commit messages.

4. feature branch, has unpushed commits

Push to the remote and create a PR.

git push -u origin HEAD
gh pr create --fill

5. feature branch, clean status

All changes have been pushed. Check the PR status.

gh pr status

If there is no PR, create one: gh pr create --fill