Revert the workspace to the state of a specified commit
The revert-to-commit command reverts your workspace to the exact state of a specified commit, discarding all changes made after that commit.
dv revert-to-commit <ref_id> [--nowait]
The <ref_id> parameter is the ID of the commit to which the workspace should be reverted.[--nowait] returns immediately without waiting for the files to finish syncing to your local workspace. By default, the command waits until the sync is done.This command is useful when you want to undo multiple commits and return to a specific point in history.
This operation will discard all changes in your workspace that came after the specified commit. Make sure to commit or shelve any work you want to keep before running this command.
An example of reverting to a specific commit:
dv revert-to-commit dv.commit.1042
After running this command, your workspace will match the state of commit dv.commit.1042.
{"docsConfig":{"$schema":"https://mintlify.com/docs.json","theme":"mint","name":"Diversion Documentation","colors":{"primary":"#477BFF","light":"#477BFF","dark":"#477BFF"},"favicon":"https://mintcdn.com/diversion-2/tgHOXPild1lTdU_m/favicon.png?fit=max\u0026auto=format\u0026n=tgHOXPild1lTdU_m\u0026q=85\u0026s=4271dfd5796806e05703182d78078973","logo":{"light":"https://mintcdn.com/diversion-2/HhHa-PhS49hu7GIa/logo/horizontal_logo_320x132.png?fit=max\u0026auto=format\u0026n=HhHa-PhS49hu7GIa\u0026q=85\u0026s=be87cd16359a5613e36c26398c95e926","dark":"https://mintcdn.com/diversion-2/HhHa-PhS49hu7GIa/logo/horizontal_logo_320x132_white.png?fit=max\u0026auto=format\u0026n=HhHa-PhS49hu7GIa\u0026q=85\u0026s=d78e5d3e0e5c576b1806618be9b653f4","href":"https://docs.diversion.dev"},"navbar":{"links":[{"label":"Support","href":"mailto:hello@diversion.dev"}],"primary":{"type":"button","label":"Login","href":"https://app.diversion.dev/"}},"footer":{"socials":{"x":"https://twitter.com/diversion_hq","linkedin":"https://www.linkedin.com/company/diversion-company-inc/","youtube":"https://www.youtube.com/@diversion-dot-dev"}},"integrations":{"ga4":{"measurementId":"G-1W30D3D2HN"},"gtm":{"tagId":"GTM-5VXJ2P3"},"mixpanel":{"projectToken":"c3706e610ea2343fb341bf4cd4fc2c18"}},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"Blog","href":"https://diversion.dev/blog","icon":"newspaper"},{"anchor":"Community","href":"https://discord.com/invite/HDAGJvgkuT","icon":"discord"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"diversion-2","hasAudioNarration":false,"actualSubdomain":"diversion-2","customDomains":["docs.diversion.dev"],"gitSource":{"type":"github","owner":"diversioncompany","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6af19cf034be7c1d8320dd1a","clientVersion":"0.0.4094","searchFilterCounts":[{"language":"default","tag":"Documentation","count":230},{"language":"default","tag":"API Reference","count":122},{"language":"default","tag":"APIリファレンス","count":122},{"language":"default","tag":"CLI Reference","count":49},{"language":"default","tag":"CLI リファレンス","count":49},{"language":"default","tag":"Get Started","count":24},{"language":"default","tag":"はじめに","count":24},{"language":"default","tag":"Reference","count":19},{"language":"default","tag":"リファレンス","count":19},{"language":"default","tag":"Organization Management","count":18}]},"assistantConfig":{"deflection":{"enabled":true,"email":"support@diversion.dev","showHelpButton":true}},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":".bordered-image{width:90%;border-radius:1.5rem;border:.3rem solid #555;box-shadow:0 0 1rem #888}ul.not-prose>li.cursor-pointer>h2.text-sm{font-size:1.5rem}.dark img[src$=\".svg\"],img[src$=\".svg\"]{max-height:80px}"}],"page":{"pagePath":"cmd-ref/revert-to-commit","slug":"/cmd-ref/revert-to-commit","pageMetadata":{"title":"revert-to-commit","description":"Revert the workspace to the state of a specified commit","href":"/cmd-ref/revert-to-commit"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Revert the workspace to the state of a specified commit\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,p:`p`,pre:`pre`,span:`span`,..._provideComponents(),...props.components},{CodeBlock,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`revert-to-commit`}),` command reverts your workspace to the exact state of a specified commit, discarding all changes made after that commit.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`dv`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` revert-to-commit`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`ref_i`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`d`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [--nowait]`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`\u003cref_id>`}),` parameter is the ID of the commit to which the workspace should be reverted.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`[--nowait]`}),` returns immediately without waiting for the files to finish syncing to your local workspace. By default, the command waits until the sync is done.`]}),`\n`,_jsx(_components.p,{children:`This command is useful when you want to undo multiple commits and return to a specific point in history.`}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`This operation will discard all changes in your workspace that came after the specified commit. Make sure to commit or shelve any work you want to keep before running this command.`})}),`\n`,_jsx(_components.p,{children:`An example of reverting to a specific commit:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`dv`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` revert-to-commit`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` dv.commit.1042`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`After running this command, your workspace will match the state of commit `,_jsx(_components.code,{children:`dv.commit.1042`}),`.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"revert-to-commit","description":"Revert the workspace to the state of a specified commit","href":"/cmd-ref/revert-to-commit"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"subdomain":"diversion-2","siteName":"Diversion Documentation","title":"revert-to-commit - Diversion Documentation","navMaps":{"firstHrefInVersion":{"English":{"href":"/cmd-ref/revert-to-commit","matchLevel":0},"日本語":{"href":"/ja/cmd-ref/revert-to-commit","matchLevel":1}},"firstHrefInLanguage":{}},"lastModified":"2026-08-27T06:36:17.310Z","originalFileLocation":"cmd-ref/revert-to-commit.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Revert the workspace to the state of a specified commit\">\u003cmeta data-mint-head name=\"application-name\" content=\"Diversion Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/diversion-2/vKXxuH8JnoQczpOe/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/diversion-2/vKXxuH8JnoQczpOe/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/diversion-2/vKXxuH8JnoQczpOe/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/diversion-2/vKXxuH8JnoQczpOe/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/diversion-2/vKXxuH8JnoQczpOe/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/diversion-2/vKXxuH8JnoQczpOe/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/diversion-2/vKXxuH8JnoQczpOe/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/diversion-2/vKXxuH8JnoQczpOe/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/diversion-2/vKXxuH8JnoQczpOe/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"revert-to-commit - Diversion Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Revert the workspace to the state of a specified commit\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Diversion Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.diversion.dev/cmd-ref/revert-to-commit\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://diversion-2.mintlify.site/_mintlify/api/og/v2?division=Commit+%26+Branch+Commands\u0026amp;title=revert-to-commit\u0026amp;description=Revert+the+workspace+to+the+state+of+a+specified+commit\u0026amp;theme=f6f71c4428a2e2c93f721e47\u0026amp;signature=a057a507d3717d97a6a39ff5d6a8bdb31e86aa50a7be9d36a736e15e0618c11b\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"revert-to-commit - Diversion Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Revert the workspace to the state of a specified commit\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://diversion-2.mintlify.site/_mintlify/api/og/v2?division=Commit+%26+Branch+Commands\u0026amp;title=revert-to-commit\u0026amp;description=Revert+the+workspace+to+the+state+of+a+specified+commit\u0026amp;theme=f6f71c4428a2e2c93f721e47\u0026amp;signature=a057a507d3717d97a6a39ff5d6a8bdb31e86aa50a7be9d36a736e15e0618c11b\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/diversion-2/vKXxuH8JnoQczpOe/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Diversion Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#477BFF\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.diversion.dev/cmd-ref/revert-to-commit\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/cmd-ref/revert-to-commit.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.diversion.dev/#organization\",\"name\":\"Diversion Documentation\",\"url\":\"https://docs.diversion.dev\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/diversion-2/HhHa-PhS49hu7GIa/logo/horizontal_logo_320x132.png?fit=max\u0026auto=format\u0026n=HhHa-PhS49hu7GIa\u0026q=85\u0026s=be87cd16359a5613e36c26398c95e926\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.diversion.dev#website\",\"name\":\"Diversion Documentation\",\"url\":\"https://docs.diversion.dev\",\"publisher\":{\"@id\":\"https://docs.diversion.dev/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.diversion.dev/cmd-ref/revert-to-commit#webpage\",\"url\":\"https://docs.diversion.dev/cmd-ref/revert-to-commit\",\"name\":\"revert-to-commit\",\"description\":\"Revert the workspace to the state of a specified commit\",\"dateModified\":\"2026-08-27T06:36:17.310Z\",\"isPartOf\":{\"@id\":\"https://docs.diversion.dev#website\"},\"breadcrumb\":{\"@id\":\"https://docs.diversion.dev/cmd-ref/revert-to-commit#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.diversion.dev/cmd-ref/revert-to-commit#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"CLI Reference\",\"item\":\"https://docs.diversion.dev/cmd-ref/about-cmd\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Commit \u0026 Branch Commands\",\"item\":\"https://docs.diversion.dev/cmd-ref/commit\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"revert-to-commit\",\"item\":\"https://docs.diversion.dev/cmd-ref/revert-to-commit\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.diversion.dev/cmd-ref/revert-to-commit#article\",\"headline\":\"revert-to-commit\",\"name\":\"revert-to-commit\",\"description\":\"Revert the workspace to the state of a specified commit\",\"url\":\"https://docs.diversion.dev/cmd-ref/revert-to-commit\",\"mainEntityOfPage\":{\"@id\":\"https://docs.diversion.dev/cmd-ref/revert-to-commit#webpage\"},\"dateModified\":\"2026-08-27T06:36:17.310Z\",\"publisher\":{\"@id\":\"https://docs.diversion.dev/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.diversion.dev#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Diversion Documentation\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Diversion Documentation","nav":{"global":{"anchors":[{"anchor":"Blog","href":"https://diversion.dev/blog","icon":"newspaper"},{"anchor":"Community","href":"https://discord.com/invite/HDAGJvgkuT","icon":"discord"}]},"versions":[{"version":"English","default":true,"tabs":[{"tab":"Documentation","groups":[{"group":"Get Started","pages":[{"title":"Introduction","mode":"wide","href":"/introduction"},{"title":"Quickstart","href":"/quickstart"},{"title":"Agent Quickstart","href":"/agent-quickstart"},{"group":"Basic Workflows","pages":[{"title":"Start using Diversion in your project","href":"/basic/start-using-diversion"},{"title":"Repository management","href":"/basic/repo-management"},{"title":"Get an existing project","href":"/basic/get-existing-project"},{"title":"Manage project access","href":"/basic/manage-project-access"},{"title":"What to do with your changes","href":"/basic/what-to-do-with-your-changes"},{"title":"Working in parallel","href":"/basic/working-in-parallel"},{"title":"Going back in time","href":"/basic/going-back-in-time"},{"title":"Tags","href":"/basic/tags"},{"title":"Undo pending changes","href":"/basic/undo-pending-changes"},{"title":"Changing the past","href":"/basic/changing-the-past"},{"title":"Workspace management","href":"/basic/workspace-management"},{"title":"Quick access","href":"/basic/quick-access"},{"title":"Find files","href":"/basic/find-files"}]},{"title":"Import from Git","href":"/basic/import-from-git"},{"title":"Import from Git LFS","href":"/basic/import-from-git-lfs"},{"title":"Import from Perforce","href":"/basic/import-from-perforce"},{"title":"Choosing Your Plan","href":"/choosing-your-plan"},{"title":"Invoices and billing","href":"/basic/invoices"},{"title":"Delete your account","href":"/basic/delete-account"},{"title":"System Messages","href":"/system-messages"},{"title":"FAQs","href":"/faqs"}]},{"group":"AI","pages":[{"title":"SlothBot","href":"/slothbot"},{"title":"AI Reviews with SlothBot","href":"/advanced/ai-reviews"},{"title":"Resolve Conflicts with AI","href":"/advanced/ai-conflict-resolution"},{"title":"Claude Code session transcripts","href":"/advanced/claude-code-session-transcripts"}]},{"group":"Collaborate","pages":[{"title":"Reviews","href":"/basic/reviews"},{"title":"Draft Commits","href":"/basic/draft-commits"},{"title":"Conflicts","href":"/concepts/conflicts"},{"title":"Soft Locks","href":"/soft-locks"},{"title":"Hard Locks","href":"/hard-locks"},{"title":"Permission Modes","href":"/collaboration/permission-modes"},{"title":"Access Levels","href":"/basic/access-levels"},{"title":"Granular Permissions","href":"/basic/granular-permissions"},{"title":"Branch Protection","href":"/basic/branch-protection"},{"title":"Organization management","href":"/basic/organization-management"},{"title":"Groups","href":"/basic/groups"}]},{"group":"Work with Unreal Engine","pages":[{"title":"Unreal Engine Plugin","href":"/unreal/unreal-engine-plugin"},{"title":"UE Plugin - Solving Merge Conflicts With Diversion","href":"/unreal/ue-plugin-merge-conflicts"},{"title":"Set up Horde with Diversion (Windows, UE5 Source)","href":"/unreal/horde-setup"}]},{"group":"Work with Unity","pages":[{"title":"Unity Plugin","href":"/unity/unity-plugin"},{"title":"Unity Best Practices with Diversion","href":"/unity/unity-best-practices"}]},{"group":"Integrations","pages":[{"title":"Plugins","href":"/integrations/overview"},{"title":"JetBrains IDEs","href":"/integrations/jetbrains-plugin"},{"title":"Set up TeamCity with Diversion","href":"/integrations/teamcity"}]},{"group":"Reference","pages":[{"group":"Core Concepts","pages":[{"title":"Repositories, Branches, and Workspaces","href":"/concepts/repo-branch-workspace"},{"title":"Branching and Merging","href":"/core-concepts/branching-merging"},{"title":"Storage","href":"/concepts/storage"},{"title":"Syncing","href":"/concepts/syncing"}]},{"title":"File Preview","href":"/advanced/asset_preview"},{"title":"CI/CD","href":"/ci-cd"},{"title":"Webhooks","href":"/webhooks"},{"title":"Sync status","href":"/basic/sync-status"},{"title":"Pause/Resume sync","href":"/basic/sync-pause-resume"},{"title":"The .dvignore file","href":"/basic/dvignore"},{"title":"Selective Sync","href":"/advanced/selective-sync"},{"title":"Cache Servers","href":"/advanced/cache-servers"},{"title":"Submodules","href":"/advanced/submodules"},{"title":"Pre-Commit Hooks","href":"/advanced/pre-commit-hooks"},{"title":"External Merge Tools","href":"/advanced/external-merge-tools"},{"title":"Resolve Conflicts with AI","href":"/advanced/ai-conflict-resolution"},{"title":"Obliterate","href":"/advanced/obliterate"},{"title":"Revision Limits","href":"/advanced/revision-limits"},{"title":"Shelves","href":"/basic/shelves"}]},{"group":"CLI Reference","pages":[{"title":"Overview","href":"/cmd-ref/about-cmd"},{"group":"Repository Commands","pages":[{"title":"init","href":"/cmd-ref/init"},{"title":"clone","href":"/cmd-ref/clone"},{"title":"status","href":"/cmd-ref/status"},{"title":"repo","href":"/cmd-ref/repo"}]},{"group":"Workspace Commands","pages":[{"title":"workspace","href":"/cmd-ref/workspace"},{"title":"checkout","href":"/cmd-ref/checkout"},{"title":"preferences","href":"/cmd-ref/preferences"}]},{"group":"Commit \u0026 Branch Commands","pages":[{"title":"commit","href":"/cmd-ref/commit"},{"title":"branch","href":"/cmd-ref/branch"},{"title":"branch-name","href":"/cmd-ref/branch-name"},{"title":"log","href":"/cmd-ref/log"},{"title":"show","href":"/cmd-ref/show"},{"title":"diff","href":"/cmd-ref/diff"},{"title":"annotate","href":"/cmd-ref/annotate"},{"title":"merge","href":"/cmd-ref/merge"},{"title":"merge-preview","href":"/cmd-ref/merge-preview"},{"title":"merge-tool","href":"/cmd-ref/merge-tool"},{"title":"revert","description":"Revert the changes made in a commit","href":"/cmd-ref/revert"},{"title":"revert-to-commit","href":"/cmd-ref/revert-to-commit"},{"title":"cherry-pick","description":"Apply changes from a specific commit to your current workspace","href":"/cmd-ref/cherry-pick"},{"title":"reset","href":"/cmd-ref/reset"},{"title":"restore","href":"/cmd-ref/restore"},{"title":"clean","href":"/cmd-ref/clean"},{"title":"tag","href":"/cmd-ref/tag"},{"title":"shelf","href":"/cmd-ref/shelf"}]},{"group":"Collaboration Commands","pages":[{"title":"review","href":"/cmd-ref/review"},{"title":"lock","href":"/cmd-ref/lock"},{"title":"share","href":"/cmd-ref/share"},{"title":"invite","href":"/cmd-ref/invite"}]},{"group":"File Commands","pages":[{"title":"ls","href":"/cmd-ref/ls"},{"title":"view","href":"/cmd-ref/view"},{"title":"cd","href":"/cmd-ref/cd"},{"title":"mkdir","href":"/cmd-ref/mkdir"},{"title":"rm","href":"/cmd-ref/rm"},{"title":"mv","href":"/cmd-ref/mv"}]},{"group":"Advanced Commands","pages":[{"title":"import","href":"/cmd-ref/import"},{"title":"obliterate","href":"/cmd-ref/obliterate"},{"title":"prune","href":"/cmd-ref/prune"},{"title":"update","href":"/cmd-ref/update"},{"title":"verify","href":"/cmd-ref/verify"},{"title":"support","href":"/cmd-ref/support"},{"title":"unregister","href":"/cmd-ref/unregister"}]},{"group":"Utility Commands","pages":[{"title":"help","href":"/cmd-ref/help"},{"title":"version","href":"/cmd-ref/version"},{"title":"login","href":"/cmd-ref/login"},{"title":"authenticate","href":"/cmd-ref/authenticate"},{"title":"logout","href":"/cmd-ref/logout"},{"title":"feedback","href":"/cmd-ref/feedback"}]}]},{"group":"Changelog","pages":[{"title":"Changelog","href":"/changelog"}]}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/api-reference/introduction"}]}]},{"version":"日本語","default":null,"pages":[{"title":"日本語","href":"/ja/cmd-ref/revert-to-commit"}]}]},"basePath":"","title":"revert-to-commit - Diversion Documentation","buildId":"dpl_42LwxxU1kGN114H4XzwGYXa9ZDah","deploymentId":"dpl_42LwxxU1kGN114H4XzwGYXa9ZDah","dynamics":[],"chunks":[]}