{"id":1573,"date":"2026-10-30T13:07:05","date_gmt":"2026-10-30T04:07:05","guid":{"rendered":"https:\/\/danlabs.kr\/?p=1573"},"modified":"2026-11-14T01:50:35","modified_gmt":"2026-11-13T16:50:35","slug":"git-stash-apply-pop-untracked","status":"publish","type":"post","link":"https:\/\/danlabs.kr\/?p=1573","title":{"rendered":"Git stash\ub85c \uc791\uc5c5 \uc7a0\uc2dc \ubcf4\uad00\ud558\uae30 \u2014 \ucd94\uc801\ud558\uc9c0 \uc54a\uc740 \ud30c\uc77c\uacfc \ubcf5\uc6d0 \ucda9\ub3cc \ud655\uc778\ubc95"},"content":{"rendered":"<p>\uae09\ud55c \uc218\uc815 \uc694\uccad\uc73c\ub85c \uc791\uc5c5\uc744 \uc804\ud658\ud574\uc57c \ud560 \ub54c, Git stash\ub97c \uc4f0\uba74 \ucee4\ubc0b\ud558\uc9c0 \uc54a\uc740 \ubcc0\uacbd\uc744 \uc7a0\uc2dc \ubcf4\uad00\ud558\uace0 \uc791\uc5c5 \ub514\ub809\ud130\ub9ac\ub97c \ub418\ub3cc\ub9b4 \uc218 \uc788\uc5b4\uc694.<a href=\"#source-1\">[1]<\/a> \ub2e4\ub9cc \uc5b4\ub5a4 \ud30c\uc77c\uc774 \ubcf4\uad00\ub418\ub294\uc9c0, \ubcf5\uc6d0\ud560 \ub54c \ubaa9\ub85d\uacfc \ucda9\ub3cc\uc744 \uc5b4\ub5bb\uac8c \ucc98\ub9ac\ud558\ub294\uc9c0 \uad6c\ubd84\ud574\uc57c \ud574\uc694. \uc2e4\ud589 \uc804\uc5d0\ub294 <code>git status<\/code>\ub85c \ud604\uc7ac \uc0c1\ud0dc\ub97c \ud655\uc778\ud558\uace0 \uc911\uc694\ud55c \ubcc0\uacbd\uc740 \ubcc4\ub3c4\ub85c \ubc31\uc5c5\ud574 \ub450\uc138\uc694.<\/p>\n<figure><img decoding=\"async\" src=\"https:\/\/danlabs.kr\/wp-content\/uploads\/2026\/10\/dev-20261030-inline1.jpg\" alt=\"Git \ubcf4\uad00 \ub300\uc0c1\uacfc \uc0c8 \ud30c\uc77c \ud3ec\ud568 \uc635\uc158 \ube44\uad50\" \/><\/figure>\n<h2>\uc0c8 \ud30c\uc77c\uacfc \ubb34\uc2dc\ub41c \ud30c\uc77c\uc740 \uc635\uc158\uc73c\ub85c \ud3ec\ud568\ud574\uc694<\/h2>\n<p><code>git stash push -m memo<\/code>\ub294 \ucd94\uc801 \uc911\uc778 \ud30c\uc77c\uc758 \ubcc0\uacbd\uacfc \uc778\ub371\uc2a4 \uc0c1\ud0dc\ub97c \ubcf4\uad00\ud574\uc694. \ubcf4\uad00\ud55c \ud56d\ubaa9\uc740 <code>git stash list<\/code>\ub85c \ud655\uc778\ud560 \uc218 \uc788\uace0, \uba54\uc2dc\uc9c0\ub97c \ubd99\uc5ec \ub450\uba74 \uc5ec\ub7ec \uc791\uc5c5\uc744 \uad6c\ubcc4\ud558\uae30 \uc26c\uc6cc\uc694.<a href=\"#source-1\">[1]<\/a><\/p>\n<p>\uc0c8\ub85c \ub9cc\ub4e0 \ud30c\uc77c\uae4c\uc9c0 \ubcf4\uad00\ud558\ub824\uba74 <code>git stash push -u -m memo<\/code>\ub97c \uc368\uc694. <code>-u<\/code>\ub294 \ucd94\uc801\ud558\uc9c0 \uc54a\uc740 \ud30c\uc77c\uc744 \ud3ec\ud568\ud558\uc9c0\ub9cc \ubb34\uc2dc\ud558\ub3c4\ub85d \uc124\uc815\ub41c \ud30c\uc77c\uc740 \ud3ec\ud568\ud558\uc9c0 \uc54a\uc544\uc694. <code>-a<\/code>\ub294 \ubb34\uc2dc\ub41c \ud30c\uc77c\ub3c4 \ud3ec\ud568\ud558\ubbc0\ub85c \ubb34\uc5c7\uc774 \uc815\ub9ac\ub420\uc9c0 \ubbf8\ub9ac \ud655\uc778\ud574\uc57c \ud574\uc694.<a href=\"#source-1\">[1]<\/a><a href=\"#source-2\">[2]<\/a><\/p>\n<p>\uc635\uc158\uc5d0 \ub530\ub77c \uc791\uc5c5 \ub514\ub809\ud130\ub9ac\uc5d0 \ub0a8\ub294 \ud30c\uc77c\uc774 \ub2ec\ub77c\uc838\uc694. \ubcf4\uad00 \ud6c4\uc5d0\ub294 <code>git status --short<\/code>\ub85c \uc2e4\uc81c \uc0c1\ud0dc\ub97c \ud655\uc778\ud558\uc138\uc694.<a href=\"#source-1\">[1]<\/a><\/p>\n<h2>\ubcc0\uacbd \ub0b4\uc6a9\uc744 \uc0b4\ud3b4\ubcf4\uace0 \ubcf4\uad00 \ubc94\uc704\ub97c \uc815\ud574\uc694<\/h2>\n<p>\ubcf4\uad00\ub41c \ubcc0\uacbd\uc740 \ubcf5\uc6d0 \uc804\uc5d0 \ud328\uce58 \ud615\ud0dc\ub85c \uc0b4\ud3b4\ubcfc \uc218 \uc788\uc5b4\uc694. <code>git stash show -p stash@\\{0\\}<\/code>\uc744 \uc0ac\uc6a9\ud558\uace0, \ucd94\uc801\ud558\uc9c0 \uc54a\uc740 \ud30c\uc77c\uae4c\uc9c0 \ud655\uc778\ud558\ub824\uba74 <code>git stash show -u -p stash@\\{0\\}<\/code>\uc744 \uc4f0\uba74 \ub3fc\uc694.<a href=\"#source-1\">[1]<\/a><\/p>\n<p>\ud2b9\uc815 \uacbd\ub85c\ub9cc \ubcf4\uad00\ud558\ub824\uba74 <code>git stash push -m memo -- \uacbd\ub85c<\/code>\ucc98\ub7fc \uc9c0\uc815\ud574\uc694. \uc774\ub54c \ud574\ub2f9 \uacbd\ub85c\uc758 \ubcc0\uacbd\ub9cc \ub300\uc0c1\uc774 \ub418\uba70, \uc608\uc2dc\uc758 <code>\uacbd\ub85c<\/code>\ub294 \uc2e4\uc81c \ud30c\uc77c\uc774\ub098 \ub514\ub809\ud130\ub9ac\ub85c \ubc14\uafd4\uc57c \ud574\uc694.<a href=\"#source-1\">[1]<\/a> \ub2e4\ub978 \ud30c\uc77c\uc758 \ubcc0\uacbd\uc740 \uc5ec\uc804\ud788 \ub0a8\uc544 \uc788\uc744 \uc218 \uc788\uc73c\ubbc0\ub85c \ubcf4\uad00 \ud6c4 \uc0c1\ud0dc\ub97c \ub2e4\uc2dc \ud655\uc778\ud558\uc138\uc694.<\/p>\n<p>\uc774\ubbf8 \uc2a4\ud14c\uc774\uc9d5\ud55c \ubcc0\uacbd\uc744 \ub0a8\uae30\uace0 \ub098\uba38\uc9c0\ub9cc \ubcf4\uad00\ud558\ub824\uba74 <code>--keep-index<\/code>\ub97c \uc0ac\uc6a9\ud560 \uc218 \uc788\uc5b4\uc694. \uacf5\uc2dd \ubb38\uc11c\uc5d0 \ub530\ub974\uba74 \uc778\ub371\uc2a4\uc5d0 \ucd94\uac00\ub41c \ubcc0\uacbd\uc740 \uadf8\ub300\ub85c \ub0a8\uc544\uc694.<a href=\"#source-1\">[1]<\/a> \ucee4\ubc0b\uc744 \ub098\ub220 \uc2dc\ud5d8\ud560 \ub54c \uc4f8 \uc218 \uc788\uc9c0\ub9cc, \uc2e4\ud589 \ub4a4\uc5d0\ub294 \uc778\ub371\uc2a4\uc640 \uc791\uc5c5 \ub514\ub809\ud130\ub9ac\ub97c \uac01\uac01 \ud655\uc778\ud558\ub294 \uac83\uc774 \uc88b\uc544\uc694.<a href=\"#source-2\">[2]<\/a><\/p>\n<h2>apply\uc640 pop\uc740 \ubcf4\uad00 \ubaa9\ub85d\uc744 \ub2e4\ub974\uac8c \ucc98\ub9ac\ud574\uc694<\/h2>\n<figure><img decoding=\"async\" src=\"https:\/\/danlabs.kr\/wp-content\/uploads\/2026\/10\/dev-20261030-inline2.jpg\" alt=\"apply\uc640 pop\uc758 \ubcf4\uad00 \ubaa9\ub85d \ucc98\ub9ac \ube44\uad50\" \/><\/figure>\n<p><code>git stash apply<\/code>\ub294 \uae30\ubcf8\uc801\uc73c\ub85c \uac00\uc7a5 \ucd5c\uadfc \ud56d\ubaa9\uc744 \uc801\uc6a9\ud558\uace0 \ubcf4\uad00 \ubaa9\ub85d\uc5d0\ub294 \ub0a8\uaca8 \ub46c\uc694. <code>git stash pop<\/code>\uc740 \uc801\uc6a9\uc5d0 \uc131\uacf5\ud558\uba74 \ud574\ub2f9 \ud56d\ubaa9\uc744 \ubaa9\ub85d\uc5d0\uc11c \uc81c\uac70\ud574\uc694. \ud2b9\uc815 \ud56d\ubaa9\uc744 \ubcf5\uc6d0\ud558\ub824\uba74 <code>git stash list<\/code>\uc5d0\uc11c \ud655\uc778\ud55c <code>stash@{\ubc88\ud638}<\/code>\ub97c \uc9c0\uc815\ud560 \uc218 \uc788\uc5b4\uc694.<a href=\"#source-1\">[1]<\/a><a href=\"#source-2\">[2]<\/a><\/p>\n<p>\uc608\ub97c \ub4e4\uc5b4 <code>git stash apply stash@\\{0\\}<\/code>\uc744 \uc2e4\ud589\ud55c \ub4a4 \ud30c\uc77c\uacfc \ud14c\uc2a4\ud2b8\ub97c \ud655\uc778\ud558\uc138\uc694. \uc774 \uba85\ub839\uc740 \uc178\uc774 \uc911\uad04\ud638\ub97c \ud574\uc11d\ud558\uc9c0 \uc54a\ub3c4\ub85d \uc5ed\uc2ac\ub798\uc2dc\ub97c \uc0ac\uc6a9\ud55c \uc608\uc2dc\uc608\uc694.<\/p>\n<p>\uc6d0\ub798 \uc2a4\ud14c\uc774\uc9d5 \uc0c1\ud0dc\uae4c\uc9c0 \ubcf5\uc6d0\ud558\ub824\uba74 <code>git stash apply --index<\/code>\ub97c \uc0ac\uc6a9\ud560 \uc218 \uc788\uc5b4\uc694. \ub2e4\ub9cc \uc778\ub371\uc2a4\uc5d0 \ucda9\ub3cc\uc774 \uc788\uc73c\uba74 \uc774 \ubcf5\uc6d0\uc774 \uc2e4\ud328\ud560 \uc218 \uc788\uc5b4\uc694.<a href=\"#source-1\">[1]<\/a><\/p>\n<h2>\ucda9\ub3cc\uc744 \ud574\uacb0\ud55c \ub4a4 \ubcf4\uad00 \ud56d\ubaa9\uc744 \uc815\ub9ac\ud574\uc694<\/h2>\n<figure><img decoding=\"async\" src=\"https:\/\/danlabs.kr\/wp-content\/uploads\/2026\/10\/dev-20261030-inline3.jpg\" alt=\"\ubcf5\uc6d0 \uc804 \ubaa9\ub85d\uacfc \ud30c\uc77c \ubc94\uc704, \ucda9\ub3cc \ud655\uc778\" \/><\/figure>\n<p>\ubcf5\uc6d0 \ub300\uc0c1 \ube0c\ub79c\uce58\uac00 \ubc14\ub00c\uc5c8\uac70\ub098 \uac19\uc740 \ubd80\ubd84\uc744 \uc218\uc815\ud588\ub2e4\uba74 \ucda9\ub3cc\uc774 \uc0dd\uae38 \uc218 \uc788\uc5b4\uc694. \uacf5\uc2dd \ubb38\uc11c\ub294 <code>pop<\/code>\uc758 \uc801\uc6a9\uc774 \ucda9\ub3cc\ub85c \uc2e4\ud328\ud558\uba74 \ubcf4\uad00 \ud56d\ubaa9\uc774 \ubaa9\ub85d\uc5d0 \ub0a8\uc73c\uba70, \ucda9\ub3cc\uc744 \ud574\uacb0\ud55c \ub4a4 \uc9c1\uc811 \uc81c\uac70\ud574\uc57c \ud55c\ub2e4\uace0 \uc124\uba85\ud574\uc694.<a href=\"#source-1\">[1]<\/a><\/p>\n<p>\ubcf4\uad00\uacfc \ubcf5\uc6d0\uc5d0\uc11c \ud655\uc778\ud560 \uac83\uc740 \uc138 \uac00\uc9c0\uc608\uc694. \ubcf4\uad00\ud560 \ub54c\ub294 \uc0c8 \ud30c\uc77c\uacfc \ubb34\uc2dc\ub41c \ud30c\uc77c\uc758 \ud3ec\ud568 \uc5ec\ubd80\ub97c \uc815\ud558\uace0, \ubcf5\uc6d0 \uc804\uc5d0\ub294 <code>git stash list<\/code>\uc640 <code>git stash show<\/code>\ub85c \ub300\uc0c1 \ud56d\ubaa9\uc744 \ud655\uc778\ud558\uc138\uc694. \ubcf5\uc6d0 \ud6c4\uc5d0\ub294 \ucda9\ub3cc\uacfc \ud14c\uc2a4\ud2b8 \uacb0\uacfc\ub97c \uc0b4\ud540 \ub4a4, \uc801\uc6a9 \uacb0\uacfc\uac00 \uc6d0\ud558\ub294 \ub0b4\uc6a9\uc77c \ub54c \ud544\uc694\ud55c \ubcf4\uad00 \ud56d\ubaa9\ub9cc \uc0ad\uc81c\ud558\uc138\uc694.<\/p>\n<h2>\ucc38\uace0 \uc790\ub8cc<\/h2>\n<p>\uba85\ub839\uacfc \uc635\uc158\uc758 \uc138\ubd80 \ub3d9\uc791\uc740 <a id=\"source-1\" href=\"https:\/\/git-scm.com\/docs\/git-stash\" target=\"_blank\" rel=\"noopener noreferrer\">[1] Git stash documentation<\/a>\uc5d0\uc11c \ud655\uc778\ud560 \uc218 \uc788\uc5b4\uc694. \ubcf4\uad00\uacfc \uc815\ub9ac\uc758 \uc0ac\uc6a9 \ud750\ub984\uc740 <a id=\"source-2\" href=\"https:\/\/git-scm.com\/book\/en\/v2\/Git-Tools-Stashing-and-Cleaning\" target=\"_blank\" rel=\"noopener noreferrer\">[2] Git Stashing and Cleaning<\/a>\uc744 \ucc38\uace0\ud558\uc138\uc694.<\/p>\n<p>\ud568\uaed8 \uc77d\uae30: <a href=\"https:\/\/danlabs.kr\/?p=1428\">Git restore\ub85c \uc218\uc815 \ub418\ub3cc\ub9ac\uae30<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Git stash\ub294 \ucee4\ubc0b\ud558\uc9c0 \uc54a\uc740 \ubcc0\uacbd\uc744 \uc7a0\uc2dc \ubcf4\uad00\ud558\uc9c0\ub9cc, \uc0c8 \ud30c\uc77c\uacfc \ubb34\uc2dc\ub41c \ud30c\uc77c\uc758 \ud3ec\ud568 \uc5ec\ubd80\ub294 \uc635\uc158\uc5d0 \ub530\ub77c \ub2ec\ub77c\uc838\uc694. apply\ub294 \ubcf4\uad00 \ud56d\ubaa9\uc744 \ub0a8\uae30\uace0 pop\uc740 \uc801\uc6a9\uc5d0 \uc131\uacf5\ud558\uba74 \uc81c\uac70\ud574\uc694. \ubcf5\uc6d0 \ub4a4\uc5d0\ub294 \ud30c\uc77c \uc0c1\ud0dc\uc640 \ucda9\ub3cc \uc5ec\ubd80\ub97c \ud655\uc778\ud55c \ub2e4\uc74c \ubaa9\ub85d\uc744 \uc815\ub9ac\ud574\uc57c \ud574\uc694.<\/p>\n","protected":false},"author":1,"featured_media":2542,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19],"tags":[],"class_list":["post-1573","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-stash-untracked-restore-conflicts-1573-concept.webp",1536,1024,false],"thumbnail":["https:\/\/danlabs.kr\/wp-content\/uploads\/2026\/11\/git-stash-untracked-restore-conflicts-1573-concept-150x150.webp",150,150,true],"medium":["https:\/\/danlabs.kr\/wp-content\/uploads\/2026\/11\/git-stash-untracked-restore-conflicts-1573-concept-300x200.webp",300,200,true],"medium_large":["https:\/\/danlabs.kr\/wp-content\/uploads\/2026\/11\/git-stash-untracked-restore-conflicts-1573-concept-768x512.webp",640,427,true],"large":["https:\/\/danlabs.kr\/wp-content\/uploads\/2026\/11\/git-stash-untracked-restore-conflicts-1573-concept-1024x683.webp",640,427,true],"1536x1536":["https:\/\/danlabs.kr\/wp-content\/uploads\/2026\/11\/git-stash-untracked-restore-conflicts-1573-concept.webp",1536,1024,false],"2048x2048":["https:\/\/danlabs.kr\/wp-content\/uploads\/2026\/11\/git-stash-untracked-restore-conflicts-1573-concept.webp",1536,1024,false],"morenews-large":["https:\/\/danlabs.kr\/wp-content\/uploads\/2026\/11\/git-stash-untracked-restore-conflicts-1573-concept.webp",825,550,false],"morenews-medium":["https:\/\/danlabs.kr\/wp-content\/uploads\/2026\/11\/git-stash-untracked-restore-conflicts-1573-concept.webp",590,393,false],"danlabs-list-small":["https:\/\/danlabs.kr\/wp-content\/uploads\/2026\/11\/git-stash-untracked-restore-conflicts-1573-concept-366x190.webp",366,190,true],"danlabs-list-retina":["https:\/\/danlabs.kr\/wp-content\/uploads\/2026\/11\/git-stash-untracked-restore-conflicts-1573-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":"0","_links":{"self":[{"href":"https:\/\/danlabs.kr\/index.php?rest_route=\/wp\/v2\/posts\/1573","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=1573"}],"version-history":[{"count":3,"href":"https:\/\/danlabs.kr\/index.php?rest_route=\/wp\/v2\/posts\/1573\/revisions"}],"predecessor-version":[{"id":2523,"href":"https:\/\/danlabs.kr\/index.php?rest_route=\/wp\/v2\/posts\/1573\/revisions\/2523"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/danlabs.kr\/index.php?rest_route=\/wp\/v2\/media\/2542"}],"wp:attachment":[{"href":"https:\/\/danlabs.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1573"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/danlabs.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1573"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/danlabs.kr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1573"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}