Skip to content

Section 0: 練習用リポジトリのフォーク

使うツール: gh (GitHub CLI) / git

目的

  • ハンズオン全体で共通の題材として、Svelte 製の Todo アプリ (ucan-lab/svelte-todo) を使う。
  • Section 1 以降の演習 (コミット / レビュー / PR 作成 / レビュー対応) を、自分のフォーク上で安全に試せる状態にする。
  • 後続セクションで複数ブランチを切り替えながら演習するため、デフォルトブランチだけでなく全ブランチをフォークしておく。

やること

  1. 自分の GitHub アカウントに svelte-todo がフォークされている。
  2. ローカルにクローン済みで、リモートに main / feat/edit-todo / feat/filter の 3 ブランチが揃っている。

アプリを実際に動かす必要はない。Section 1 以降は Claude Code でコードを読んだりレビューさせたりできれば十分なので、npm install / npm run dev は任意。

手順

1. 全ブランチごとフォークしてクローンする

bash
# フォーク + ローカルクローン (作業用ディレクトリに移動してから実行)
gh repo fork ucan-lab/svelte-todo --clone
cd svelte-todo
gh repo view --web

実行後の状態:

  • 自分のアカウント (<your-account>/svelte-todo) にフォークが作られる
  • カレントディレクトリにクローンされる
  • リモートが 2 つ設定される (origin = 自分のフォーク, upstream = 元リポジトリ)

2. リモートとブランチを確認

bash
git remote -v
git branch -a

期待する出力:

text
origin    git@github.com:<your-account>/svelte-todo.git (fetch)
origin    git@github.com:<your-account>/svelte-todo.git (push)
upstream  https://github.com/ucan-lab/svelte-todo.git (fetch)
upstream  https://github.com/ucan-lab/svelte-todo.git (push)

* main
  remotes/origin/HEAD -> origin/main
  remotes/origin/feat/edit-todo
  remotes/origin/feat/filter
  remotes/origin/feat/todo-enhancements
  remotes/origin/main

2026-05-07 開催 / 開発フロー自動化ハンズオン