https://daleseo.com/git-worktree/
다른 명령어들# git worktree는 몇 개의 명령어가 더 있다. 그 중 자주 사용할 만한 명령어를 몇 개 더 소개하고자 한다.
git worktree add 고급#
위에서는 단순히 git worktree add
git worktree add
❯ git worktree list /Users/sample/Development/project cbfc60b [main] /Users/sample/Development/project-hotfix cbfc60b [project-hotfix] prunable 워크 트리의 경로와 현재 어떤 커밋과 브랜치를 바라보고 있는지 등을 확인할 수 있다.
git worktree remove# git worktree remove는 더 이상 필요 없어진 워크 트리를 지우기 위한 명령어다.
❯ git worktree remove project-hotfix ❯ git worktree list /Users/sample/Development/project cbfc60b [main] 명령어로 지우고 싶은 워크 트리의 이름이나 경로를 입력해 주면 워크 트리를 제거할 수 있다. 이 때 브랜치는 지워지지 않는다.