SuperAPI AI Directory

git-teacher-setup

General & other

View repository

Updated 10-15 21:42

About this skill

Getting Started — Phase 1 + 2 (Barda Git Teacher)

Handles Git/GitHub initial setup (Phase 1) and project folder creation (Phase 2) at once. Steps that are already complete are automatically skipped.

Phase 1: Preparation

"It's like installing the Google Drive app and logging in with a Google account."

Step 1: Parallel status collection

Run the following commands in parallel :

git --version 2>/dev/null              # git 설치 확인
gh --version 2>/dev/null               # gh 설치 확인
git config --global user.name          # 이름 설정 확인
git config --global user.email         # 이메일 설정 확인
gh auth status 2>&1                    # GitHub 로그인 확인

Step 2: Skip completed steps + proceed with incomplete steps

Analyze the collection results, show already completed items with a check mark, and proceed only with incomplete items.

2a. Git installation (if not installed)

Git이 설치되어 있지 않아요. 설치할게요.
드라이브를 쓰려면 드라이브 앱이 필요한 것처럼, Git도 앱이 필요해요.

macOS:

xcode-select --install

Windows: https://git-scm.com/download/win Download the installation file from .

Linux:

sudo apt-get install git

Verify after installation: git --version

2b. GitHub CLI (gh) installation (if not installed)

GitHub CLI를 설치할게요. GitHub에 파일을 올리는 데 필요한 도구예요.

macOS (when Homebrew is available):

brew install gh

When Homebrew is not available: First guide the user to install Homebrew.

Windows:

winget install --id GitHub.cli

Linux:

(type -p wget >/dev/null || (sudo apt update && sudo apt-get install wget -y)) \
&& sudo mkdir -p -m 755 /etc/apt/keyrings \
&& out=$(mktemp) && wget -nv -O$out https://cli.github.com/packages/githubcli-archive-keyring.gpg \
&& cat $out | sudo tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null \
&& sudo chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg \
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
&& sudo apt update \
&& sudo apt install gh -y

Or if it can be installed directly from the distribution repository: sudo apt install gh

Verify after installation: gh --version

2c. Git user information setup (if not set)

You need to register your name and email with Git. It's like entering your name when creating a Google account. It's used to record "who modified it" when saving files.

EXECUTE: Immediately call the AskUserQuestion tool with the JSON below:

{
  "questions": [{
    "question": "Git에 등록할 이름과 이메일을 알려주세요. (예: 홍길동 / hong@email.com)",
    "header": "사용자 정보",
    "options": [
      {"label": "직접 입력", "description": "이름과 이메일을 Other에 입력해주세요 (예: 홍길동 / hong@email.com)"},
      {"label": "GitHub 계정과 동일", "description": "GitHub 로그인 후 자동으로 가져올게요"}
    ],
    "multiSelect": false
  }]
}
git config --global user.name "사용자 이름"
git config --global user.email "사용자 이메일"

2d. GitHub login (if not logged in)

GitHub에 로그인할게요. 구글 계정으로 드라이브에 로그인하는 것과 같아요.
브라우저 창이 열리면 로그인하고 승인해주세요.
gh auth login --web --git-protocol https

Step 3: Confirm Phase 1 completion

준비 완료!
  - Git 설치됨 (v2.xx)
  - GitHub 로그인됨 (계정: username)

이제 프로젝트 폴더를 만들 수 있어요.

Phase 2: Creating a folder

"It's like creating a new shared folder in Google Drive."

Step 4: Project selection

EXECUTE: Immediately call the AskUserQuestion tool with the JSON below:

{
  "questions": [{
    "question": "프로젝트 폴더를 어떻게 만들까요?",
    "header": "프로젝트",
    "options": [
      {"label": "새 프로젝트 시작하기", "description": "빈 폴더를 만들어요"},
      {"label": "기존 프로젝트 가져오기", "description": "GitHub에 있는 폴더를 복사해요"},
      {"label": "현재 폴더를 프로젝트로 만들기", "description": "지금 이 폴더를 Git으로 관리해요"}
    ],
    "multiSelect": false
  }]
}

Option 1: Start a new project

Receive the project name via AskUserQuestion.

mkdir {project-name} && cd {project-name}
git init
gh repo create {project-name} --public --source=. --remote=origin --push

Option 2: Import an existing project

Receive the GitHub URL or repository name via AskUserQuestion.

Analyze the user input and run the appropriate command:

  • owner/repo Format: gh repo clone {owner/repo}
  • https://github.com/... Format: git clone {URL}
  • git@github.com:... Format: git clone {URL}

Option 3: Make the current folder into a project

git init
gh repo create {folder-name} --public --source=. --remote=origin --push

Step 5: Confirm Phase 2 completion

폴더 준비 완료!
  - 내 컴퓨터: /Users/me/my-project
  - 클라우드: https://github.com/username/my-project

이 두 곳이 연결되어 있어요. 드라이브의 "동기화 폴더"와 비슷하죠.
단, 자동 동기화는 안 돼요 — 직접 "저장"하고 "올려야" 해요.

파일을 수정한 뒤 "저장해줘"라고 하면 됩니다.

If everything is already set up

If all checks pass:

이미 다 준비되어 있어요!

  - Git 설치됨 (v2.xx)
  - GitHub 로그인됨 (계정: username)
  - 프로젝트 연결됨: https://github.com/username/my-project

바로 작업을 시작할 수 있어요.
"상태 확인"으로 현재 상태를 볼 수 있고,
파일을 수정한 뒤 "저장해줘"로 저장할 수 있어요.