{"id":7294,"date":"2025-09-26T18:00:07","date_gmt":"2025-09-26T23:00:07","guid":{"rendered":"https:\/\/frontendmasters.com\/blog\/?p=7294"},"modified":"2025-09-26T18:00:08","modified_gmt":"2025-09-26T23:00:08","slug":"git-worktrees-git-done-right","status":"publish","type":"post","link":"https:\/\/frontendmasters.com\/blog\/git-worktrees-git-done-right\/","title":{"rendered":"Git Worktrees: Git Done Right"},"content":{"rendered":"\n<p>I admit I&#8217;ve never once used a Git Worktree. But Nick Taylor <a href=\"https:\/\/www.nickyt.co\/blog\/git-worktrees-git-done-right-2p7f\/\">has a pretty good intro<\/a> that compels me. (Nick <a href=\"https:\/\/www.youtube.com\/watch?v=8vsRb2mTBA8\">credits bashbunni<\/a> for her own intro).<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>Git worktrees let you check out multiple branches from the same repository simultaneously, each in its own working directory. Instead of constantly switching between branches with\u00a0<code>git checkout<\/code>, you can have separate directories for different features, bug fixes, or experiments.<\/p>\n<\/blockquote>\n\n\n\n<p>So instead of just <em>one<\/em> folder on your computer representing your project, you can have <em>multiple<\/em> folders, each representing different branches of the same repo. That just feels weird to me, hence never having tried it. But if&#8230;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>You do a lot of branch-hopping<\/li>\n\n\n\n<li>You don&#8217;t like committing half-done work<\/li>\n\n\n\n<li>You don&#8217;t like <code>git stash<\/code><\/li>\n<\/ul>\n\n\n\n<p>&#8230; Git Worktrees might be for you. The reason I&#8217;m a little compelled at the moment is that I use GitHub Desktop and stashing kinda sucks in it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I admit I&#8217;ve never once used a Git Worktree. But Nick Taylor has a pretty good intro that compels me. (Nick credits bashbunni for her own intro). Git worktrees let you check out multiple branches from the same repository simultaneously, each in its own working directory. Instead of constantly switching between branches with\u00a0git checkout, you [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":7297,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"sig_custom_text":"","sig_image_type":"featured-image","sig_custom_image":0,"sig_is_disabled":false,"inline_featured_image":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[29],"tags":[141,407],"class_list":["post-7294","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-the-beat","tag-git","tag-git-worktrees"],"acf":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/frontendmasters.com\/blog\/wp-content\/uploads\/2025\/09\/pexels-photo-1632790.jpeg?fit=1880%2C1251&ssl=1","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/frontendmasters.com\/blog\/wp-json\/wp\/v2\/posts\/7294","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/frontendmasters.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/frontendmasters.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/frontendmasters.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/frontendmasters.com\/blog\/wp-json\/wp\/v2\/comments?post=7294"}],"version-history":[{"count":1,"href":"https:\/\/frontendmasters.com\/blog\/wp-json\/wp\/v2\/posts\/7294\/revisions"}],"predecessor-version":[{"id":7296,"href":"https:\/\/frontendmasters.com\/blog\/wp-json\/wp\/v2\/posts\/7294\/revisions\/7296"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/frontendmasters.com\/blog\/wp-json\/wp\/v2\/media\/7297"}],"wp:attachment":[{"href":"https:\/\/frontendmasters.com\/blog\/wp-json\/wp\/v2\/media?parent=7294"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/frontendmasters.com\/blog\/wp-json\/wp\/v2\/categories?post=7294"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/frontendmasters.com\/blog\/wp-json\/wp\/v2\/tags?post=7294"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}