From a90698825fc50f574c9c69956b9708b9fb060082 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 2 Feb 2026 11:22:31 +0000 Subject: [PATCH 1/2] Initial plan From 4ad3b8a26902b5d687f2587520e586e8fcc60c43 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 2 Feb 2026 11:25:31 +0000 Subject: [PATCH 2/2] feat: enhance dev reset to fully reset branch state Co-authored-by: echosoar <14832743+echosoar@users.noreply.github.com> --- packages/dev/src/git.ts | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/packages/dev/src/git.ts b/packages/dev/src/git.ts index b4741fe..fbbeb55 100644 --- a/packages/dev/src/git.ts +++ b/packages/dev/src/git.ts @@ -343,7 +343,27 @@ export class GitPlugin extends BasePlugin { } async handleResetDo() { - await exec('git checkout .', { slience: false }); + console.log(''); + console.warn('>> Warning: This will reset all changes in the current branch! <<'); + console.warn('>> - New files will be deleted <<'); + console.warn('>> - Modified files will be restored <<'); + console.warn('>> - Deleted files will be restored <<'); + console.warn('>> - Staged files will be reset <<'); + console.log(''); + + await this.needConfirm(); + + console.log('Resetting branch...'); + + // Reset staged and modified files + await exec('git reset --hard HEAD', { slience: false }); + + // Remove untracked files and directories + await exec('git clean -fd', { slience: false }); + + console.log(''); + console.log('>> Branch reset successfully! <<'); + console.log(''); } async handleCheckoutDo() {