Loading...
Loading...
Git과 GitHub 초기 설정을 단계별로 진행합니다. "git 설정", "처음 시작", "GitHub 로그인", "깃 세팅" 같은 요청에 사용됩니다.
npx skill4agent add ai-native-camp/git-for-everyone git-onboarding-setupwhich gitgit config --global user.namegit config --global user.emailwhich gh 2>/dev/null && echo "installed" || echo "none"gh auth status 2>&1git rev-parse --git-dir 2>/dev/null && echo "repo" || echo "no-repo"git remote get-url origin 2>/dev/null || echo "no-remote"git ls-remote --heads origin main 2>/dev/null | grep -q main && echo "remote-branch: exists" || echo "remote-branch: none"for hook in pre-commit commit-msg pre-push; do test -x .git/hooks/$hook && echo "$hook: exists" || echo "$hook: none"; donewhich gitGit이 설치되어 있지 않습니다.
터미널에서 아래 명령어를 직접 실행하세요:
xcode-select --install
설치 팝업이 나타나면 "설치" 버튼을 클릭하세요.
설치가 완료되면 다시 /git-onboarding-setup 을 실행해주세요.git config --global user.namegit config --global user.name "<입력받은 이름>"git config --global user.emailgit config --global user.email "<입력받은 이메일>"which ghbrew install ghbrew install gh아래 링크에서 GitHub CLI를 다운로드하여 설치하세요:
https://cli.github.com
설치가 완료되면 다시 /git-onboarding-setup 을 실행해주세요.gh auth status 2>&1GitHub에 로그인해야 합니다.
터미널에서 아래 명령어를 직접 실행하세요:
gh auth login --hostname github.com --git-protocol https --web
브라우저가 자동으로 열리고 인증 코드가 표시됩니다:
1. 터미널에 나오는 코드를 확인
2. 브라우저에서 코드를 입력하고 인증 완료
완료되면 다시 /git-onboarding-setup 을 실행해주세요.gh auth logingh auth status 2>&1git rev-parse --git-dirgit clone <URL>git initgit remote get-url originno-remotegh repo create $(basename "$PWD") --source=. --remote=origin --<public|private>--source=.--remote=origingit remote add origin <URL>git remote -vgit ls-remote --heads origin main 2>/dev/nullgit ls-remote --heads origin main 2>/dev/null | grep -q main && echo "remote-branch: exists" || echo "remote-branch: none"git log --oneline -1 2>/dev/nullgit add -A
git commit -m "chore: initial commit"git push -u origin mainGitHub에 main 브랜치를 생성했습니다.
이제 원격 저장소와 로컬이 연결되었습니다..git/hooks/pre-commit.git/hooks/commit-msg.git/hooks/pre-pushfor hook in pre-commit commit-msg pre-push; do test -x .git/hooks/$hook && echo "$hook: exists" || echo "$hook: none"; donePLUGIN_ROOTgit-hooks/${CLAUDE_PLUGIN_ROOT}/git-hookscp ${CLAUDE_PLUGIN_ROOT}/git-hooks/pre-commit .git/hooks/pre-commit
cp ${CLAUDE_PLUGIN_ROOT}/git-hooks/commit-msg .git/hooks/commit-msg
cp ${CLAUDE_PLUGIN_ROOT}/git-hooks/pre-push .git/hooks/pre-push
chmod +x .git/hooks/pre-commit .git/hooks/commit-msg .git/hooks/pre-pushGit hook을 설치했습니다.
pre-commit: main/master에서 commit 차단 → 새 브랜치로 안내
commit-msg: conventional commits 형식 검증 (feat:, fix:, docs: 등)
pre-push: main/master로 push 차단 → 새 브랜치로 안내
터미널에서 직접 git을 사용할 때도 동일하게 보호됩니다.Git 초기 설정이 완료되었습니다.
이름: <user.name>
이메일: <user.email>
GitHub: 로그인됨
저장소: <현재 디렉토리>
원격: <origin URL>
보호: <"팀 — main 보호 + conventional commits (git hooks)" 또는 "개인 — 없음">
다음 단계: /git-onboarding-workflow 를 실행하면 브랜치 생성부터 PR까지 안내합니다.