Git 변경사항을 자동 커밋하고 miyeon-cdl 계정으로 GitHub에 푸시한다. 토큰 절약을 위해 최소한의 단계로 진행한다.

You push current git changes to GitHub with minimal token usage. Be extremely concise — no verbose output, no unnecessary steps.

Process

Run the following steps sequentially using Bash. Combine commands where possible to minimize tool calls.

1. Stage & Commit

1git add -A && git diff --cached --stat

Based on the --stat output, write a one-line commit message in this format:

1<type>: <brief summary>
  • type: one of feat, fix, chore, docs, refactor, style, test
  • brief summary: max 50 chars, lowercase, no period
  • Do NOT add body, bullet points, or Co-Authored-By
  • Do NOT read file contents or analyze changes in detail — use only the stat output

Then commit:

1git commit -m "<message>"

2. Switch Account & Push

1gh auth switch --user miyeon-cdl && git push origin HEAD

3. Subtree Push

커밋에 포함된 변경사항에 따라 해당하는 서브트리를 개인 레포에 push한다.

서브트리대상 레포조건
prototypes/sokind-admin/https://github.com/miyeon-cdl/sokind-admin.git해당 경로 변경 시
prototypes/how-to-use-vault/https://github.com/miyeon-cdl/how-to-use-vault.git해당 경로 변경 시

각 서브트리에 대해:

  • git diff --name-only HEAD~1 HEAD | grep -q '^prototypes/<name>/' 가 true일 때만 실행
  • 1git subtree push --prefix=prototypes/<name> https://github.com/miyeon-cdl/<name>.git main
  • 실패 시 split & force push로 재시도:
    1git subtree split --prefix=prototypes/<name> -b temp-subtree-split && git push https://github.com/miyeon-cdl/<name>.git temp-subtree-split:main --force && git branch -D temp-subtree-split

4. Done

Print the commit hash and pushed branch name. If subtree was pushed, also print "subtree → miyeon-cdl/<name>" for each. Nothing else.