로딩
요청 처리 중입니다...

[Git] Git worktree 사용방법

 [Git] Git worktree 사용방법

Intro Git은 기본적으로 한 개의 branch에서만 작업이 가능하다. 하지만 경우에 따라서는 여러 개의 branch를 왔다갔다 하면서 작업을 해야 할 수가 있는데, 이런 때에 Git worktree를 사용하면 된다.

Goals · Git worktree 사용법 Content Git worktree는 git clone을 한 것과 유사한 효과를 낼 수 있다. 다른 점이 있다면, repository를 복사함과 동시에 branch도 새로 만든다는 점이다.

예를 들어 1.txt라는 file이 있다고 가정해보자. 현재 master branch이며, git worktree를 사용해서 hotfix branch를 생성해보자.

'git worktree add hotfix' command를 입력하면 된다. 'git worktree list'를 입력해서 현재 worktree를..........