문제
❯ git checkout main
error: pathspec 'main' did not match any file(s) known to git
해결
❯ git remote update
Fetching origin
remote: Enumerating objects: 6, done.
remote: Counting objects: 100% (6/6), done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 6 (delta 0), reused 3 (delta 0), pack-reused 0 (from 0)
Unpacking objects: 100% (6/6), 1.10 KiB | 161.00 KiB/s, done.
From https://github.com/jinnkimm7/simple-board-with-mybatis
* [new branch] main -> origin/main
❯ git checkout main
branch 'main' set up to track 'origin/main'.
Switched to a new branch 'main'
- git remote update : 모든 원격 브랜치를 업데이트하여 최신 상태로 갱신합니다.
참고