[{"data":1,"prerenderedAt":545},["ShallowReactive",2],{"navigation_en":3,"-docs-uxd-guides-refresh-a-workspace":150,"-docs-uxd-guides-refresh-a-workspace-surround":540},{"docs":4},[5,41,86,121],{"title":6,"icon":7,"path":8,"stem":9,"children":10,"page":7},"Getting Started",false,"\u002Fdocs\u002Fuxd\u002Fgetting-started","docs\u002Fuxd\u002Fgetting-started",[11,16,21,26,31,36],{"title":12,"path":13,"stem":14,"icon":15},"Introduction","\u002Fdocs\u002Fuxd\u002Fgetting-started\u002Fintroduction","docs\u002Fuxd\u002Fgetting-started\u002F01.introduction","i-lucide-house",{"title":17,"path":18,"stem":19,"icon":20},"Installation","\u002Fdocs\u002Fuxd\u002Fgetting-started\u002Finstallation","docs\u002Fuxd\u002Fgetting-started\u002F02.installation","i-lucide-download",{"title":22,"path":23,"stem":24,"icon":25},"Quick Start","\u002Fdocs\u002Fuxd\u002Fgetting-started\u002Fquick-start","docs\u002Fuxd\u002Fgetting-started\u002F03.quick-start","i-lucide-zap",{"title":27,"path":28,"stem":29,"icon":30},"How It Works","\u002Fdocs\u002Fuxd\u002Fgetting-started\u002Fhow-it-works","docs\u002Fuxd\u002Fgetting-started\u002F04.how-it-works","i-lucide-workflow",{"title":32,"path":33,"stem":34,"icon":35},"Refs","\u002Fdocs\u002Fuxd\u002Fgetting-started\u002Frefs","docs\u002Fuxd\u002Fgetting-started\u002F05.refs","i-lucide-git-branch",{"title":37,"path":38,"stem":39,"icon":40},"Workspaces & Worktrees","\u002Fdocs\u002Fuxd\u002Fgetting-started\u002Fworkspaces","docs\u002Fuxd\u002Fgetting-started\u002F06.workspaces","i-lucide-folder-tree",{"title":42,"icon":7,"path":43,"stem":44,"children":45,"page":7},"Guides","\u002Fdocs\u002Fuxd\u002Fguides","docs\u002Fuxd\u002Fguides",[46,51,56,61,66,71,76,81],{"title":47,"path":48,"stem":49,"icon":50},"Review a Pull Request","\u002Fdocs\u002Fuxd\u002Fguides\u002Freview-a-pull-request","docs\u002Fuxd\u002Fguides\u002F01.review-a-pull-request","i-lucide-git-pull-request",{"title":52,"path":53,"stem":54,"icon":55},"Run Dev Servers in Parallel","\u002Fdocs\u002Fuxd\u002Fguides\u002Frun-dev-servers-in-parallel","docs\u002Fuxd\u002Fguides\u002F02.run-dev-servers-in-parallel","i-lucide-plug",{"title":57,"path":58,"stem":59,"icon":60},"Seed Local Files","\u002Fdocs\u002Fuxd\u002Fguides\u002Fseed-local-files","docs\u002Fuxd\u002Fguides\u002F03.seed-local-files","i-lucide-sprout",{"title":62,"path":63,"stem":64,"icon":65},"Refresh a Workspace","\u002Fdocs\u002Fuxd\u002Fguides\u002Frefresh-a-workspace","docs\u002Fuxd\u002Fguides\u002F04.refresh-a-workspace","i-lucide-refresh-cw",{"title":67,"path":68,"stem":69,"icon":70},"Clean Up Workspaces","\u002Fdocs\u002Fuxd\u002Fguides\u002Fclean-up-workspaces","docs\u002Fuxd\u002Fguides\u002F05.clean-up-workspaces","i-lucide-trash-2",{"title":72,"path":73,"stem":74,"icon":75},"Script with uxd","\u002Fdocs\u002Fuxd\u002Fguides\u002Fscript-with-uxd","docs\u002Fuxd\u002Fguides\u002F06.script-with-uxd","i-lucide-braces",{"title":77,"path":78,"stem":79,"icon":80},"Install Shell Completions","\u002Fdocs\u002Fuxd\u002Fguides\u002Fshell-completions","docs\u002Fuxd\u002Fguides\u002F07.shell-completions","i-lucide-keyboard",{"title":82,"path":83,"stem":84,"icon":85},"Troubleshooting","\u002Fdocs\u002Fuxd\u002Fguides\u002Ftroubleshooting","docs\u002Fuxd\u002Fguides\u002F08.troubleshooting","i-lucide-stethoscope",{"title":87,"icon":7,"path":88,"stem":89,"children":90,"page":7},"CLI Reference","\u002Fdocs\u002Fuxd\u002Fcli","docs\u002Fuxd\u002Fcli",[91,96,101,106,111,116],{"title":92,"path":93,"stem":94,"icon":95},"Command Grammar","\u002Fdocs\u002Fuxd\u002Fcli\u002Foverview","docs\u002Fuxd\u002Fcli\u002F01.overview","i-lucide-terminal",{"title":97,"path":98,"stem":99,"icon":100},"Workspace Verbs","\u002Fdocs\u002Fuxd\u002Fcli\u002Fworkspace-verbs","docs\u002Fuxd\u002Fcli\u002F02.workspace-verbs","i-lucide-folder-git-2",{"title":102,"path":103,"stem":104,"icon":105},"Project Verbs","\u002Fdocs\u002Fuxd\u002Fcli\u002Fproject-verbs","docs\u002Fuxd\u002Fcli\u002F03.project-verbs","i-lucide-boxes",{"title":107,"path":108,"stem":109,"icon":110},"Top-Level Verbs","\u002Fdocs\u002Fuxd\u002Fcli\u002Ftop-level-verbs","docs\u002Fuxd\u002Fcli\u002F04.top-level-verbs","i-lucide-wrench",{"title":112,"path":113,"stem":114,"icon":115},"Global Flags","\u002Fdocs\u002Fuxd\u002Fcli\u002Fglobal-flags","docs\u002Fuxd\u002Fcli\u002F05.global-flags","i-lucide-flag",{"title":117,"path":118,"stem":119,"icon":120},"Exit Codes","\u002Fdocs\u002Fuxd\u002Fcli\u002Fexit-codes","docs\u002Fuxd\u002Fcli\u002F06.exit-codes","i-lucide-circle-alert",{"title":122,"icon":7,"path":123,"stem":124,"children":125,"page":7},"Configuration","\u002Fdocs\u002Fuxd\u002Fconfiguration","docs\u002Fuxd\u002Fconfiguration",[126,131,136,141,145],{"title":127,"path":128,"stem":129,"icon":130},"Overview","\u002Fdocs\u002Fuxd\u002Fconfiguration\u002Foverview","docs\u002Fuxd\u002Fconfiguration\u002F01.overview","i-lucide-settings",{"title":132,"path":133,"stem":134,"icon":135},"Project File","\u002Fdocs\u002Fuxd\u002Fconfiguration\u002Fproject-file","docs\u002Fuxd\u002Fconfiguration\u002F02.project-file","i-lucide-file-code",{"title":137,"path":138,"stem":139,"icon":140},"Commands & Hooks","\u002Fdocs\u002Fuxd\u002Fconfiguration\u002Fcommands-and-hooks","docs\u002Fuxd\u002Fconfiguration\u002F03.commands-and-hooks","i-lucide-play",{"title":142,"path":143,"stem":144,"icon":75},"Environment & Templates","\u002Fdocs\u002Fuxd\u002Fconfiguration\u002Fenvironment-and-templates","docs\u002Fuxd\u002Fconfiguration\u002F04.environment-and-templates",{"title":146,"path":147,"stem":148,"icon":149},"Editors","\u002Fdocs\u002Fuxd\u002Fconfiguration\u002Feditors","docs\u002Fuxd\u002Fconfiguration\u002F05.editors","i-lucide-app-window",{"id":151,"title":62,"body":152,"description":532,"extension":533,"links":534,"meta":535,"navigation":536,"path":63,"seo":537,"stem":64,"__hash__":539},"docs_docs\u002Fdocs\u002Fuxd\u002Fguides\u002F04.refresh-a-workspace.md",{"type":153,"value":154,"toc":526},"minimark",[155,164,193,201,204,209,220,273,320,327,348,352,361,382,385,399,405,409,430,449,455,458,475,479,488,522],[156,157,158,159,163],"p",{},"The author pushed new commits. ",[160,161,162],"code",{},"sync"," re-fetches the ref and hard-resets the\nworktree to it.",[165,166,171],"pre",{"className":167,"code":168,"language":169,"meta":170,"style":170},"language-bash shiki shiki-themes github-light-high-contrast github-light-high-contrast github-dark-high-contrast","uxd my-project 42 sync\n","bash","",[160,172,173],{"__ignoreMap":170},[174,175,178,182,186,190],"span",{"class":176,"line":177},"line",1,[174,179,181],{"class":180},"szw1H","uxd",[174,183,185],{"class":184},"semJd"," my-project",[174,187,189],{"class":188},"ssYy9"," 42",[174,191,192],{"class":184}," sync\n",[165,194,199],{"className":195,"code":197,"language":198},[196],"language-text","→ fetching origin\u002Ffeat\u002Flogin\n→ dbf4f36a → dbf4f36a, 0 file(s) changed\n","text",[160,200,197],{"__ignoreMap":170},[156,202,203],{},"The summary line reports the old and new commits and how many files moved, so\nyou can tell at a glance whether anything actually changed.",[205,206,208],"h2",{"id":207},"when-the-tree-is-dirty","When the tree is dirty",[156,210,211,212,214,215,219],{},"A plain ",[160,213,162],{}," ",[216,217,218],"strong",{},"refuses"," to run on a dirty worktree rather than silently\ndestroying your edits. Pick what should happen to them:",[221,222,223,236],"table",{},[224,225,226],"thead",{},[227,228,229,233],"tr",{},[230,231,232],"th",{},"Flag",[230,234,235],{},"Effect",[237,238,239,253,263],"tbody",{},[227,240,241,247],{},[242,243,244],"td",{},[160,245,246],{},"--stash",[242,248,249,252],{},[160,250,251],{},"git stash"," the changes, then reset",[227,254,255,260],{},[242,256,257],{},[160,258,259],{},"--discard",[242,261,262],{},"Throw the changes away, then reset",[227,264,265,270],{},[242,266,267],{},[160,268,269],{},"--fresh",[242,271,272],{},"Remove the workspace and materialize it from scratch",[165,274,276],{"className":167,"code":275,"language":169,"meta":170,"style":170},"uxd my-project 42 sync --stash\nuxd my-project 42 sync --discard\nuxd my-project 42 sync --fresh\n",[160,277,278,292,306],{"__ignoreMap":170},[174,279,280,282,284,286,289],{"class":176,"line":177},[174,281,181],{"class":180},[174,283,185],{"class":184},[174,285,189],{"class":188},[174,287,288],{"class":184}," sync",[174,290,291],{"class":188}," --stash\n",[174,293,295,297,299,301,303],{"class":176,"line":294},2,[174,296,181],{"class":180},[174,298,185],{"class":184},[174,300,189],{"class":188},[174,302,288],{"class":184},[174,304,305],{"class":188}," --discard\n",[174,307,309,311,313,315,317],{"class":176,"line":308},3,[174,310,181],{"class":180},[174,312,185],{"class":184},[174,314,189],{"class":188},[174,316,288],{"class":184},[174,318,319],{"class":188}," --fresh\n",[156,321,322,323,326],{},"The three are mutually exclusive — passing two is a usage error (",[160,324,325],{},"E_USAGE",",\nexit code 2).",[328,329,331,333,334,336,337,340,341,343,344,347],"tip",{"title":330},"Which one do I want?",[160,332,246],{}," when the edits are worth keeping (debug logging you will want back).\n",[160,335,259],{}," when they are not (a ",[160,338,339],{},"console.log"," you already read).\n",[160,342,269],{}," when the workspace itself is suspect — a half-finished install, a\n",[160,345,346],{},"node_modules"," you no longer trust, a rebase that went sideways.",[205,349,351],{"id":350},"check-first-act-second","Check first, act second",[156,353,354,357,358,360],{},[160,355,356],{},"--dry-run"," prints what ",[160,359,162],{}," would do without touching anything:",[165,362,364],{"className":167,"code":363,"language":169,"meta":170,"style":170},"uxd my-project 42 sync --discard --dry-run\n",[160,365,366],{"__ignoreMap":170},[174,367,368,370,372,374,376,379],{"class":176,"line":177},[174,369,181],{"class":180},[174,371,185],{"class":184},[174,373,189],{"class":188},[174,375,288],{"class":184},[174,377,378],{"class":188}," --discard",[174,380,381],{"class":188}," --dry-run\n",[156,383,384],{},"To see whether a workspace is dirty at all, read its status:",[165,386,388],{"className":167,"code":387,"language":169,"meta":170,"style":170},"uxd my-project list\n",[160,389,390],{"__ignoreMap":170},[174,391,392,394,396],{"class":176,"line":177},[174,393,181],{"class":180},[174,395,185],{"class":184},[174,397,398],{"class":184}," list\n",[165,400,403],{"className":401,"code":402,"language":198},[196],"SLUG        KIND    BRANCH      STATUS  PORT  AGE  LAST USED\npr-42       pr      feat\u002Flogin  dirty   5700  2h   1h\nfeat-search branch  feat\u002Fsearch clean   5701  4h   3h\n",[160,404,402],{"__ignoreMap":170},[205,406,408],{"id":407},"refresh-the-setup-too","Refresh the setup too",[156,410,411,413,414,417,418,421,422,425,426,429],{},[160,412,162],{}," moves the git tree. It does not re-run your install command on its own —\nthat happens on the next ",[160,415,416],{},"run",", ",[160,419,420],{},"exec",", or ",[160,423,424],{},"shell",", and only if the files in\n",[160,427,428],{},"setup.cache_key"," changed:",[165,431,433],{"className":167,"code":432,"language":169,"meta":170,"style":170},"uxd my-project 42 run dev\n",[160,434,435],{"__ignoreMap":170},[174,436,437,439,441,443,446],{"class":176,"line":177},[174,438,181],{"class":180},[174,440,185],{"class":184},[174,442,189],{"class":188},[174,444,445],{"class":184}," run",[174,447,448],{"class":184}," dev\n",[165,450,453],{"className":451,"code":452,"language":198},[196],"→ worktree ready (reused)\n→ setup up to date (cache hit)\n",[160,454,452],{"__ignoreMap":170},[156,456,457],{},"If the lockfile moved in the fetched commits, the hash changes and the install\nruns. To force it regardless:",[165,459,461],{"className":167,"code":460,"language":169,"meta":170,"style":170},"uxd my-project 42 sync --fresh\n",[160,462,463],{"__ignoreMap":170},[174,464,465,467,469,471,473],{"class":176,"line":177},[174,466,181],{"class":180},[174,468,185],{"class":184},[174,470,189],{"class":188},[174,472,288],{"class":184},[174,474,319],{"class":188},[205,476,478],{"id":477},"refresh-the-ref-before-materializing","Refresh the ref before materializing",[156,480,481,483,484,487],{},[160,482,162],{}," is for workspaces that already exist. To force a re-fetch as part of\nmaterializing, use ",[160,485,486],{},"--fetch"," on the verb you were going to run anyway:",[165,489,491],{"className":167,"code":490,"language":169,"meta":170,"style":170},"uxd my-project 42 checkout --fetch\nuxd my-project 42 run dev --fetch\n",[160,492,493,507],{"__ignoreMap":170},[174,494,495,497,499,501,504],{"class":176,"line":177},[174,496,181],{"class":180},[174,498,185],{"class":184},[174,500,189],{"class":188},[174,502,503],{"class":184}," checkout",[174,505,506],{"class":188}," --fetch\n",[174,508,509,511,513,515,517,520],{"class":176,"line":294},[174,510,181],{"class":180},[174,512,185],{"class":184},[174,514,189],{"class":188},[174,516,445],{"class":184},[174,518,519],{"class":184}," dev",[174,521,506],{"class":188},[523,524,525],"style",{},"html pre.shiki code .szw1H, html code.shiki .szw1H{--shiki-light:#702C00;--shiki-default:#702C00;--shiki-dark:#FFB757}html pre.shiki code .semJd, html code.shiki .semJd{--shiki-light:#032563;--shiki-default:#032563;--shiki-dark:#ADDCFF}html pre.shiki code .ssYy9, html code.shiki .ssYy9{--shiki-light:#023B95;--shiki-default:#023B95;--shiki-dark:#91CBFF}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":170,"searchDepth":294,"depth":294,"links":527},[528,529,530,531],{"id":207,"depth":294,"text":208},{"id":350,"depth":294,"text":351},{"id":407,"depth":294,"text":408},{"id":477,"depth":294,"text":478},"Bring a workspace up to date with its ref, and decide what happens to local changes.","md",null,{},{"icon":65},{"title":62,"description":538},"Use uxd sync to re-fetch a ref and reset a workspace — with --stash, --discard, or --fresh to control what happens to local changes.","bsWbzmqhApY2tK2dpEuV4jbkw2sDKXuhBm9xydEhoig",[541,543],{"title":57,"path":58,"stem":59,"description":542,"icon":60,"children":-1},"Get .env.local and other untracked files into every new workspace automatically.",{"title":67,"path":68,"stem":69,"description":544,"icon":70,"children":-1},"Remove workspaces by name or by filter, and reconcile state when something was deleted behind uxd's back.",1789131075305]