git checkout 과 git checkout -b는 쓰임이 다르다.
원격에 feature/desk가 존재하지만, 로컬에는 feature/desk라는 이름의 브랜치가 존재하지 않을 때 git checkout을 사용하면 원격을 추적하는 feature/desk가 바로 생성되지만 git checkout -b를 사용하면 원격을 추적하지 않는 feature/desk가 생성된다.
PS D:\workspace\test> git checkout feature/desk
Switched to a new branch 'feature/desk'
branch 'feature/desk' set up to track 'origin/feature/desk'.
PS D:\workspace\test> git branch -vv
dev 0f808ef [origin/dev] Merge pull request #2 from leegunsun/feature/desk
* feature/desk 31ea517 [origin/feature/desk] real_main
main 0f808ef [origin/main] Merge pull request #2 from leegunsun/feature/desk
PS D:\workspace\test> git checkout -b feature/desk
Switched to a new branch 'feature/desk'
PS D:\workspace\test> git branch -vv
dev 0f808ef [origin/dev] Merge pull request #2 from leegunsun/feature/desk
* feature/desk 0f808ef Merge pull request #2 from leegunsun/feature/desk
main 0f808ef [origin/main] Merge pull request #2 from leegunsun/feature/desk