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