{"id":1718,"date":"2026-11-03T13:07:09","date_gmt":"2026-11-03T04:07:09","guid":{"rendered":"https:\/\/danlabs.kr\/?p=1718"},"modified":"2026-11-14T01:45:15","modified_gmt":"2026-11-13T16:45:15","slug":"git-worktree-add-remove-prune","status":"publish","type":"post","link":"https:\/\/danlabs.kr\/?p=1718","title":{"rendered":"Git worktree\ub85c \ube0c\ub79c\uce58 \uc5ec\ub7ec \uac1c \ub3d9\uc2dc\uc5d0 \uc5f4\uae30 \u2014 add\u00b7remove\u00b7prune\uc758 \uc5ed\ud560"},"content":{"rendered":"<p>\ub9ac\ud329\ud130\ub9c1 \ub3c4\uc911 \uae34\uae09 \uc218\uc815 \uc694\uccad\uc774 \ub4e4\uc5b4\uc624\uba74 \uc791\uc5c5 \uc911\uc778 \ud30c\uc77c\uc744 \uac74\ub4dc\ub9ac\uc9c0 \uc54a\uace0 \ub2e4\ub978 \ube0c\ub79c\uce58\ub97c \uc5f4\uc5b4\uc57c \ud574\uc694. <code>git stash<\/code>\ub85c \ubcc0\uacbd\uc744 \uc7a0\uc2dc \ubcf4\uad00\ud560 \uc218\ub3c4 \uc788\uc9c0\ub9cc, <code>git worktree<\/code>\ub97c \uc4f0\uba74 \uac19\uc740 \uc800\uc7a5\uc18c\uc5d0 \uc791\uc5c5 \ud2b8\ub9ac\ub97c \uc5ec\ub7ec \uac1c \ub450\uace0 \ube0c\ub79c\uce58\ub97c \ub3d9\uc2dc\uc5d0 \uccb4\ud06c\uc544\uc6c3\ud560 \uc218 \uc788\uc5b4\uc694.<a href=\"https:\/\/git-scm.com\/docs\/git-worktree\" target=\"_blank\" rel=\"noopener noreferrer\">[1]<\/a><\/p>\n<p>Git \uacf5\uc2dd \ubb38\uc11c\ub97c \uae30\uc900\uc73c\ub85c <code>add<\/code>, <code>remove<\/code>, <code>prune<\/code>\uc774 \ub9cc\ub4e4\uace0 \uc815\ub9ac\ud558\ub294 \ubc94\uc704\uc640, <code>lock<\/code>, <code>repair<\/code>\uac00 \ud544\uc694\ud55c \uc870\uac74\uc744 \uc0b4\ud3b4\ubcfc\uac8c\uc694.<\/p>\n<figure><img fetchpriority=\"high\" decoding=\"async\" src=\"https:\/\/danlabs.kr\/wp-content\/uploads\/2026\/11\/dev-20261103-inline1.jpg\" alt=\"\ud558\ub098\uc758 \uc800\uc7a5\uc18c\uc5d0\uc11c \uc791\uc5c5 \ud2b8\ub9ac\ub97c \ub098\ub204\ub294 \uad6c\uc870 \ub3c4\uc2dd\" width=\"1280\" height=\"720\"><\/figure>\n<h2>\uc800\uc7a5\uc18c\ub294 \uacf5\uc720\ud558\uace0 \uc791\uc5c5 \ud2b8\ub9ac\ub294 \ub098\ub204\uae30<\/h2>\n<p><code>git init<\/code>\uc774\ub098 <code>git clone<\/code>\uc73c\ub85c \ub9cc\ub4e0 \ucabd\uc740 \uc8fc \uc791\uc5c5 \ud2b8\ub9ac, <code>git worktree add<\/code>\ub85c \ucd94\uac00\ud55c \ucabd\uc740 \uc5f0\uacb0\ub41c \uc791\uc5c5 \ud2b8\ub9ac(linked worktree)\ub77c\uace0 \ubd88\ub7ec\uc694. \ud558\ub098\uc758 \uc800\uc7a5\uc18c\uc5d0 \uc5ec\ub7ec \uc791\uc5c5 \ud2b8\ub9ac\ub97c \ub450\uba74 \ub458 \uc774\uc0c1\uc758 \ube0c\ub79c\uce58\ub97c \ub3d9\uc2dc\uc5d0 \uccb4\ud06c\uc544\uc6c3\ud560 \uc218 \uc788\uc5b4\uc694.<a href=\"https:\/\/git-scm.com\/docs\/git-worktree\" target=\"_blank\" rel=\"noopener noreferrer\">[1]<\/a><\/p>\n<p>\uc5f0\uacb0\ub41c \uc791\uc5c5 \ud2b8\ub9ac\ub294 <code>HEAD<\/code>, <code>index<\/code> \uac19\uc740 \uc791\uc5c5 \ud2b8\ub9ac\ubcc4 \ud30c\uc77c\uc744 \uc81c\uc678\ud55c \uc800\uc7a5\uc18c\uc758 \ub098\uba38\uc9c0\ub97c \uacf5\uc720\ud574\uc694. \uc791\uc5c5 \uacf5\uac04\uc744 \ub098\ub204\ub418 \uc800\uc7a5\uc18c\ub97c \ud1b5\uc9f8\ub85c \ub2e4\uc2dc \ubcf5\uc81c\ud558\uc9c0 \uc54a\ub294 \uad6c\uc870\uc608\uc694.<a href=\"https:\/\/git-scm.com\/docs\/git-worktree\" target=\"_blank\" rel=\"noopener noreferrer\">[1]<\/a><\/p>\n<h2>add\ub85c \uc0c8 \ube0c\ub79c\uce58\ub098 \uae30\uc874 \ube0c\ub79c\uce58 \uc5f4\uae30<\/h2>\n<figure><img decoding=\"async\" src=\"https:\/\/danlabs.kr\/wp-content\/uploads\/2026\/11\/dev-20261103-inline2.jpg\" alt=\"\uc791\uc5c5 \ud2b8\ub9ac \ucd94\uac00\uc640 \uc0ad\uc81c \ud750\ub984 \ub3c4\uc2dd\" width=\"1280\" height=\"720\"><\/figure>\n<p>\uac00\uc7a5 \ub2e8\uc21c\ud55c \ud615\ud0dc\uc778 <code>git worktree add &lt;\uacbd\ub85c&gt;<\/code>\ub294 \uacbd\ub85c\uc758 \ub9c8\uc9c0\ub9c9 \uad6c\uc131 \uc694\uc18c\uc640 \uac19\uc740 \uc774\ub984\uc758 \uc0c8 \ube0c\ub79c\uce58\ub97c \ub9cc\ub4e4\uc5b4\uc694. \uacf5\uc2dd \ubb38\uc11c\uc758 \uc608\uc2dc\uc778 <code>git worktree add ..\/hotfix<\/code>\ub294 <code>hotfix<\/code> \ube0c\ub79c\uce58\ub97c \ub9cc\ub4e4\uace0 \ud574\ub2f9 \uacbd\ub85c\uc5d0 \uccb4\ud06c\uc544\uc6c3\ud574\uc694.<a href=\"https:\/\/git-scm.com\/docs\/git-worktree\" target=\"_blank\" rel=\"noopener noreferrer\">[1]<\/a><\/p>\n<p>\uae30\uc874 \ube0c\ub79c\uce58\ub97c \uc5f4 \ub54c\ub294 <code>git worktree add &lt;\uacbd\ub85c&gt; &lt;\ube0c\ub79c\uce58&gt;<\/code>\ub97c \uc368\uc694. \ud574\ub2f9 \ube0c\ub79c\uce58\uac00 \ub2e4\ub978 \uc791\uc5c5 \ud2b8\ub9ac\uc5d0\uc11c \uc774\ubbf8 \uccb4\ud06c\uc544\uc6c3\ub3fc \uc788\uc73c\uba74 <code>add<\/code>\ub294 \uc0dd\uc131\uc744 \uac70\ubd80\ud574\uc694. \uc774 \uc548\uc804\uc7a5\uce58\ub294 <code>--force<\/code>\ub85c \uc6b0\ud68c\ud560 \uc218 \uc788\uc5b4\uc694.<a href=\"https:\/\/git-scm.com\/docs\/git-worktree\" target=\"_blank\" rel=\"noopener noreferrer\">[1]<\/a><\/p>\n<p>\uc0c8 \ube0c\ub79c\uce58\uac00 \ud544\uc694 \uc5c6\ub294 \uc784\uc2dc \uc2dc\ud5d8\uc5d0\ub294 <code>-d<\/code> \uc635\uc158\uc744 \uc4f8 \uc218 \uc788\uc5b4\uc694. \ubd84\ub9ac\ub41c <code>HEAD<\/code> \uc0c1\ud0dc\uc758 \uc791\uc5c5 \ud2b8\ub9ac\ub97c \ub9cc\ub4dc\ub294 \uc635\uc158\uc774\uc5d0\uc694.<a href=\"https:\/\/git-scm.com\/docs\/git-worktree\" target=\"_blank\" rel=\"noopener noreferrer\">[1]<\/a><\/p>\n<h2>remove\ub294 \uc791\uc5c5 \ud2b8\ub9ac, prune\uc740 \ub0a8\uc740 \uad00\ub9ac \ud30c\uc77c \uc815\ub9ac<\/h2>\n<p>\ub2e4 \uc4f4 \uc791\uc5c5 \ud2b8\ub9ac\ub294 <code>git worktree remove<\/code>\ub85c \uc9c0\uc6cc\uc694. \uae30\ubcf8\uc801\uc73c\ub85c \uae68\ub057\ud55c \uc791\uc5c5 \ud2b8\ub9ac\ub9cc \uc0ad\uc81c\ud560 \uc218 \uc788\uc5b4\uc694. \ucd94\uc801 \uc911\uc778 \ud30c\uc77c\uc5d0 \uc218\uc815\uc774 \uc788\uac70\ub098 \ucd94\uc801\ud558\uc9c0 \uc54a\ub294 \ud30c\uc77c\uc774 \ub0a8\uc544 \uc788\uc73c\uba74 \uc0ad\uc81c\uac00 \uac70\ubd80\ub418\uba70, \uac15\uc81c\ub85c \uc9c0\uc6b0\ub824\uba74 <code>--force<\/code>\uac00 \ud544\uc694\ud574\uc694. \uc8fc \uc791\uc5c5 \ud2b8\ub9ac\ub294 \uc0ad\uc81c\ud560 \uc218 \uc5c6\uc5b4\uc694.<a href=\"https:\/\/git-scm.com\/docs\/git-worktree\" target=\"_blank\" rel=\"noopener noreferrer\">[1]<\/a><\/p>\n<p>\uacf5\uc2dd \ubb38\uc11c\uc758 \uc608\uc2dc\ub294 \uc784\uc2dc \uc791\uc5c5 \ud2b8\ub9ac\ub97c \ub9cc\ub4e4\uace0, \uadf8\uacf3\uc5d0\uc11c \uc218\uc815\ud55c \ub0b4\uc6a9\uc744 \ucee4\ubc0b\ud55c \ub4a4, <code>git worktree remove<\/code>\ub85c \uc815\ub9ac\ud558\uace0 \uc6d0\ub798 \uc791\uc5c5\uc73c\ub85c \ub3cc\uc544\uc624\ub294 \ud750\ub984\uc774\uc5d0\uc694. <code>--force<\/code>\ub97c \uc4f0\uba74 \ucee4\ubc0b\ud558\uc9c0 \uc54a\uc740 \ubcc0\uacbd\uc744 \uc783\uc744 \uc218 \uc788\uc73c\ubbc0\ub85c \uc0ad\uc81c \uc804\uc5d0 \uc0c1\ud0dc\ub97c \ud655\uc778\ud574\uc57c \ud574\uc694.<a href=\"https:\/\/git-scm.com\/docs\/git-worktree\" target=\"_blank\" rel=\"noopener noreferrer\">[1]<\/a><\/p>\n<p><code>git worktree remove<\/code>\ub97c \uc4f0\uc9c0 \uc54a\uace0 \ud3f4\ub354\ub9cc \uc9c1\uc811 \uc9c0\uc6b0\uba74 \uc800\uc7a5\uc18c\uc5d0 \uad00\ub9ac\uc6a9 \ud30c\uc77c\uc774 \ub0a8\uc544\uc694. \uc774 \ud30c\uc77c\uc740 \uc124\uc815\uac12 <code>gc.worktreePruneExpire<\/code>\uc5d0 \ub530\ub77c \uacb0\uad6d \uc790\ub3d9\uc73c\ub85c \uc815\ub9ac\ub3fc\uc694. \ubc14\ub85c \uc815\ub9ac\ud558\ub824\uba74 <code>git worktree prune<\/code>\uc744 \uc2e4\ud589\ud574\uc694.<a href=\"https:\/\/git-scm.com\/docs\/git-worktree\" target=\"_blank\" rel=\"noopener noreferrer\">[1]<\/a><\/p>\n<h2>\uc77c\uc2dc\uc801\uc73c\ub85c \uc5f0\uacb0\uc774 \ub04a\uae30\uba74 lock, \uc704\uce58\ub97c \uc62e\uacbc\ub2e4\uba74 repair<\/h2>\n<p>\uc774\ub3d9\uc2dd \uc7a5\uce58\ub098 \ub124\ud2b8\uc6cc\ud06c \uacf5\uc720\ucc98\ub7fc \ud56d\uc0c1 \uc5f0\uacb0\ub3fc \uc788\uc9c0 \uc54a\uc740 \uc704\uce58\uc5d0 \uc791\uc5c5 \ud2b8\ub9ac\ub97c \ub450\uc5c8\ub2e4\uba74 <code>git worktree lock<\/code>\uc73c\ub85c \uc815\ub9ac \ub300\uc0c1\uc5d0\uc11c \uc81c\uc678\ud560 \uc218 \uc788\uc5b4\uc694. \uc7a0\uadfc \uc774\uc720\ub294 <code>--reason<\/code>\uc73c\ub85c \ub0a8\uae38 \uc218 \uc788\uc5b4\uc694.<a href=\"https:\/\/git-scm.com\/docs\/git-worktree\" target=\"_blank\" rel=\"noopener noreferrer\">[1]<\/a><\/p>\n<p>\ud3f4\ub354\ub97c <code>git worktree move<\/code> \uc5c6\uc774 \uc62e\uacbc\ub2e4\uba74 \uc0c8 \uc704\uce58\uc5d0\uc11c <code>git worktree repair<\/code>\ub97c \uc2e4\ud589\ud574 \uc5f0\uacb0\uc744 \ubcf5\uad6c\ud574\uc694.<a href=\"https:\/\/git-scm.com\/docs\/git-worktree\" target=\"_blank\" rel=\"noopener noreferrer\">[1]<\/a><\/p>\n<h2>\uc801\uc6a9 \uc804\uc5d0 \ud655\uc778\ud560 \uc138 \uac00\uc9c0<\/h2>\n<figure><img decoding=\"async\" src=\"https:\/\/danlabs.kr\/wp-content\/uploads\/2026\/11\/dev-20261103-inline3.jpg\" alt=\"\uc11c\ube0c\ubaa8\ub4c8\uacfc \ube0c\ub79c\uce58 \uc911\ubcf5, \ubbf8\ucee4\ubc0b \ubcc0\uacbd \uc810\uac80 \ud56d\ubaa9\" width=\"1280\" height=\"720\"><\/figure>\n<p>\uacf5\uc2dd \ubb38\uc11c\uc758 BUGS \ud56d\ubaa9\uc740 \uc5ec\ub7ec \uccb4\ud06c\uc544\uc6c3 \uae30\ub2a5\uc774 \uc544\uc9c1 \uc2e4\ud5d8\uc801\uc774\uba70 \uc11c\ube0c\ubaa8\ub4c8 \uc9c0\uc6d0\uc774 \ubd88\uc644\uc804\ud558\ub2e4\uace0 \uc124\uba85\ud574\uc694. \uc0c1\uc704 \ud504\ub85c\uc81d\ud2b8(superproject)\ub97c \uc5ec\ub7ec \ubc88 \uccb4\ud06c\uc544\uc6c3\ud558\ub294 \uac83\ub3c4 \uad8c\uc7a5\ud558\uc9c0 \uc54a\uc544\uc694.<a href=\"https:\/\/git-scm.com\/docs\/git-worktree\" target=\"_blank\" rel=\"noopener noreferrer\">[1]<\/a> \uc801\uc6a9 \uc804\uc5d0\ub294 \ub2e4\uc74c \uc138 \uac00\uc9c0\ub97c \ud655\uc778\ud558\uc138\uc694.<\/p>\n<ul>\n<li>\uc11c\ube0c\ubaa8\ub4c8\uc744 \uc4f0\ub294 \uc800\uc7a5\uc18c\uc778\uc9c0 \ud655\uc778\ud574\uc694.<\/li>\n<li>\uac19\uc740 \ube0c\ub79c\uce58\ub97c \ub450 \uacf3\uc5d0\uc11c \uc5f4\ub824\ub294 \uac83\uc740 \uc544\ub2cc\uc9c0 \ud655\uc778\ud574\uc694.<\/li>\n<li>\uc0ad\uc81c\ud560 \uc791\uc5c5 \ud2b8\ub9ac\uc5d0 \ucee4\ubc0b\ud558\uc9c0 \uc54a\uc740 \ubcc0\uacbd\uc774 \ub0a8\uc544 \uc788\ub294\uc9c0 \ud655\uc778\ud574\uc694.<\/li>\n<\/ul>\n<h2>\ucd9c\ucc98<\/h2>\n<ul>\n<li id=\"source-1\"><a href=\"https:\/\/git-scm.com\/docs\/git-worktree\" target=\"_blank\" rel=\"noopener noreferrer\">Git \u2014 git-worktree Documentation (\uac8c\uc2dc\uc77c \ubbf8\ud45c\uae30, 2026-11-03 \uc870\ud68c)<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Git worktree\ub97c \uc4f0\uba74 \uc791\uc5c5 \uc911\uc778 \ud30c\uc77c\uc744 \uadf8\ub300\ub85c \ub450\uace0 \ub2e4\ub978 \ube0c\ub79c\uce58\ub97c \ubcc4\ub3c4 \ub514\ub809\ud130\ub9ac\uc5d0\uc11c \uc5f4 \uc218 \uc788\uc5b4\uc694. \uc791\uc5c5 \ud2b8\ub9ac\ub97c \uc0ad\uc81c\ud558\ub294 remove\uc640 \ub0a8\uc740 \uad00\ub9ac \ud30c\uc77c\uc744 \uc815\ub9ac\ud558\ub294 prune\uc740 \uc5ed\ud560\uc774 \ub2e4\ub974\uba70, \uac15\uc81c \uc0ad\uc81c \uc804\uc5d0\ub294 \ucee4\ubc0b\ud558\uc9c0 \uc54a\uc740 \ubcc0\uacbd\uc744 \ud655\uc778\ud574\uc57c \ud574\uc694.<\/p>\n","protected":false},"author":1,"featured_media":2464,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19],"tags":[],"class_list":["post-1718","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-dev"],"featured_image_urls":{"full":["https:\/\/danlabs.kr\/wp-content\/uploads\/2026\/11\/git-worktree-add-remove-prune-1718-concept.webp",1536,1024,false],"thumbnail":["https:\/\/danlabs.kr\/wp-content\/uploads\/2026\/11\/git-worktree-add-remove-prune-1718-concept-150x150.webp",150,150,true],"medium":["https:\/\/danlabs.kr\/wp-content\/uploads\/2026\/11\/git-worktree-add-remove-prune-1718-concept-300x200.webp",300,200,true],"medium_large":["https:\/\/danlabs.kr\/wp-content\/uploads\/2026\/11\/git-worktree-add-remove-prune-1718-concept-768x512.webp",640,427,true],"large":["https:\/\/danlabs.kr\/wp-content\/uploads\/2026\/11\/git-worktree-add-remove-prune-1718-concept-1024x683.webp",640,427,true],"1536x1536":["https:\/\/danlabs.kr\/wp-content\/uploads\/2026\/11\/git-worktree-add-remove-prune-1718-concept.webp",1536,1024,false],"2048x2048":["https:\/\/danlabs.kr\/wp-content\/uploads\/2026\/11\/git-worktree-add-remove-prune-1718-concept.webp",1536,1024,false],"morenews-large":["https:\/\/danlabs.kr\/wp-content\/uploads\/2026\/11\/git-worktree-add-remove-prune-1718-concept.webp",825,550,false],"morenews-medium":["https:\/\/danlabs.kr\/wp-content\/uploads\/2026\/11\/git-worktree-add-remove-prune-1718-concept.webp",590,393,false],"danlabs-list-small":["https:\/\/danlabs.kr\/wp-content\/uploads\/2026\/11\/git-worktree-add-remove-prune-1718-concept-366x190.webp",366,190,true],"danlabs-list-retina":["https:\/\/danlabs.kr\/wp-content\/uploads\/2026\/11\/git-worktree-add-remove-prune-1718-concept-1464x760.webp",1464,760,true]},"author_info":{"display_name":"DanLABs","author_link":"https:\/\/danlabs.kr\/author\/hello-danlabs-kr"},"category_info":"<a href=\"https:\/\/danlabs.kr\/?cat=19\" rel=\"category\">\uac1c\ubc1c<\/a>","tag_info":"\uac1c\ubc1c","comment_count":"1","_links":{"self":[{"href":"https:\/\/danlabs.kr\/index.php?rest_route=\/wp\/v2\/posts\/1718","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/danlabs.kr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/danlabs.kr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/danlabs.kr\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/danlabs.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1718"}],"version-history":[{"count":3,"href":"https:\/\/danlabs.kr\/index.php?rest_route=\/wp\/v2\/posts\/1718\/revisions"}],"predecessor-version":[{"id":2468,"href":"https:\/\/danlabs.kr\/index.php?rest_route=\/wp\/v2\/posts\/1718\/revisions\/2468"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/danlabs.kr\/index.php?rest_route=\/wp\/v2\/media\/2464"}],"wp:attachment":[{"href":"https:\/\/danlabs.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1718"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/danlabs.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1718"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/danlabs.kr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1718"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}