feat(folder): add commit reset action in git log

Add a "Reset to Here" context action for git log commit items in the folder page.

Show a reset dialog with branch, target commit, commit message, and reset mode details for soft, mixed, hard, and keep.

Disable reset when viewing a non-current branch filter and keep the action ordering under commit diff.

Add git_reset support across Rust commands, Tauri invoke registration, web handlers/routes, and frontend API/type bindings.

Add localized reset labels, mode descriptions, and toast messages across all supported languages.
This commit is contained in:
xintaofei
2026-04-15 11:14:37 +08:00
parent 66549ce2f7
commit f3630ba48a
18 changed files with 600 additions and 21 deletions

View File

@@ -1181,6 +1181,8 @@
"loadingBranches": "جارٍ تحميل الفروع...",
"noContainingBranches": "لم يتم العثور على فروع تحتوي هذا الالتزام.",
"newBranch": "فرع جديد...",
"resetToHere": "إعادة الضبط إلى هنا",
"resetDisabledReasonNotCurrentBranchView": "متاح فقط عند عرض الفرع الحالي",
"viewCommitDiffAria": "عرض diff للالتزام {hash}",
"copyFullCommitHashAria": "نسخ hash الكامل للالتزام {hash}",
"pushStatus": {
@@ -1199,7 +1201,10 @@
"createdAndSwitchedNewBranch": "تم إنشاء فرع جديد والتبديل إليه",
"newBranchFromCommit": "{name} (من {shortHash})",
"createBranchFailed": "فشل إنشاء الفرع",
"openPushWindowFailed": "فشل فتح نافذة الدفع"
"openPushWindowFailed": "فشل فتح نافذة الدفع",
"resetSuccess": "تمت إعادة الضبط بنجاح",
"resetSuccessDescription": "تمت إعادة ضبط {branch} إلى {shortHash} باستخدام {mode}",
"resetFailed": "فشلت إعادة الضبط"
},
"branchSelector": {
"selectBranchPlaceholder": "اختر فرعًا...",
@@ -1211,7 +1216,33 @@
"dialogs": {
"newBranchTitle": "فرع جديد",
"newBranchDescription": "إنشاء فرع جديد مع الالتزام {shortHash} كأحدث التزام.",
"branchNamePlaceholder": "اسم الفرع"
"branchNamePlaceholder": "اسم الفرع",
"reset": {
"title": "إعادة ضبط الفرع الحالي إلى هذا الالتزام",
"branchLabel": "الفرع",
"targetLabel": "الالتزام الهدف",
"messageLabel": "الرسالة",
"modeLabel": "وضع إعادة الضبط",
"confirmButton": "إعادة الضبط",
"modes": {
"soft": {
"label": "--soft",
"description": "ينقل HEAD ومؤشر الفرع الحالي إلى الالتزام الهدف.\nيبقي Index و Working Tree بدون تغيير.\nتظل تغييرات الالتزامات التي تمت إزالتها في حالة staged."
},
"mixed": {
"label": "--mixed (الافتراضي)",
"description": "ينقل HEAD إلى الالتزام الهدف.\nيعيد ضبط Index إلى الالتزام الهدف مع الإبقاء على تغييرات Working Tree.\nتتحول التغييرات من staged إلى unstaged."
},
"hard": {
"label": "--hard",
"description": "ينقل HEAD ويعيد ضبط كل من Index و Working Tree إلى الالتزام الهدف.\nسيتم حذف التغييرات المحلية المتتبعة بعد الالتزام الهدف.\nهذه عملية تدميرية."
},
"keep": {
"label": "--keep",
"description": "ينقل HEAD إلى الالتزام الهدف مع محاولة الاحتفاظ بالتغييرات المحلية.\nيتم الاحتفاظ فقط بالتغييرات غير المتعارضة.\nعند وجود تعارض، يتم إيقاف العملية لحماية عملك."
}
}
}
}
},
"gitChangesTab": {

View File

@@ -1181,6 +1181,8 @@
"loadingBranches": "Branches werden geladen...",
"noContainingBranches": "Keine enthaltenen Branches gefunden.",
"newBranch": "Neuer Branch...",
"resetToHere": "Auf diesen Stand zurücksetzen",
"resetDisabledReasonNotCurrentBranchView": "Nur in der Ansicht des aktuellen Branches verfügbar",
"viewCommitDiffAria": "Diff für Commit {hash} anzeigen",
"copyFullCommitHashAria": "Vollständigen Commit-Hash {hash} kopieren",
"pushStatus": {
@@ -1199,7 +1201,10 @@
"createdAndSwitchedNewBranch": "Neuen Branch erstellt und gewechselt",
"newBranchFromCommit": "{name} (aus {shortHash})",
"createBranchFailed": "Branch konnte nicht erstellt werden",
"openPushWindowFailed": "Push-Fenster konnte nicht geöffnet werden"
"openPushWindowFailed": "Push-Fenster konnte nicht geöffnet werden",
"resetSuccess": "Zurücksetzen erfolgreich",
"resetSuccessDescription": "{branch} wurde mit {mode} auf {shortHash} zurückgesetzt",
"resetFailed": "Zurücksetzen fehlgeschlagen"
},
"branchSelector": {
"selectBranchPlaceholder": "Branch auswählen...",
@@ -1211,7 +1216,33 @@
"dialogs": {
"newBranchTitle": "Neuer Branch",
"newBranchDescription": "Erstelle einen neuen Branch mit Commit {shortHash} als letztem Commit.",
"branchNamePlaceholder": "Branch-Name"
"branchNamePlaceholder": "Branch-Name",
"reset": {
"title": "Aktuellen Branch auf diesen Commit zurücksetzen",
"branchLabel": "Branch",
"targetLabel": "Ziel-Commit",
"messageLabel": "Nachricht",
"modeLabel": "Reset-Modus",
"confirmButton": "Zurücksetzen",
"modes": {
"soft": {
"label": "--soft",
"description": "Verschiebt HEAD und den Zeiger des aktuellen Branches auf den Ziel-Commit.\nIndex und Working Tree bleiben unverändert.\nÄnderungen aus den entfernten Commits bleiben staged."
},
"mixed": {
"label": "--mixed (Standard)",
"description": "Verschiebt HEAD auf den Ziel-Commit.\nSetzt den Index auf den Ziel-Commit zurück und behält Änderungen im Working Tree.\nÄnderungen wechseln von staged zu unstaged."
},
"hard": {
"label": "--hard",
"description": "Verschiebt HEAD und setzt sowohl Index als auch Working Tree auf den Ziel-Commit zurück.\nLokale verfolgte Änderungen nach dem Ziel-Commit werden verworfen.\nDies ist eine destruktive Operation."
},
"keep": {
"label": "--keep",
"description": "Verschiebt HEAD auf den Ziel-Commit und versucht lokale Änderungen zu behalten.\nNur nicht-konfliktierende Änderungen bleiben erhalten.\nBei Konflikten wird der Reset zum Schutz der Änderungen abgebrochen."
}
}
}
}
},
"gitChangesTab": {

View File

@@ -1181,6 +1181,8 @@
"loadingBranches": "Loading branches...",
"noContainingBranches": "No containing branches found.",
"newBranch": "New branch...",
"resetToHere": "Reset to Here",
"resetDisabledReasonNotCurrentBranchView": "Available only when viewing current branch",
"viewCommitDiffAria": "View diff for commit {hash}",
"copyFullCommitHashAria": "Copy full commit hash {hash}",
"pushStatus": {
@@ -1199,7 +1201,10 @@
"createdAndSwitchedNewBranch": "Created and switched to new branch",
"newBranchFromCommit": "{name} (from {shortHash})",
"createBranchFailed": "Failed to create branch",
"openPushWindowFailed": "Failed to open push window"
"openPushWindowFailed": "Failed to open push window",
"resetSuccess": "Reset successful",
"resetSuccessDescription": "{branch} reset to {shortHash} with {mode}",
"resetFailed": "Reset failed"
},
"branchSelector": {
"selectBranchPlaceholder": "Select branch...",
@@ -1211,7 +1216,33 @@
"dialogs": {
"newBranchTitle": "New branch",
"newBranchDescription": "Create a new branch with commit {shortHash} as the latest commit.",
"branchNamePlaceholder": "Branch name"
"branchNamePlaceholder": "Branch name",
"reset": {
"title": "Reset Current Branch to Here",
"branchLabel": "Branch",
"targetLabel": "Target",
"messageLabel": "Message",
"modeLabel": "Reset mode",
"confirmButton": "Reset",
"modes": {
"soft": {
"label": "--soft",
"description": "Move HEAD and the current branch pointer to the target commit.\nKeep Index and Working Tree unchanged.\nChanges from the removed commits stay staged."
},
"mixed": {
"label": "--mixed (default)",
"description": "Move HEAD to the target commit.\nReset Index to the target commit while keeping Working Tree changes.\nThose changes become unstaged."
},
"hard": {
"label": "--hard",
"description": "Move HEAD and reset both Index and Working Tree to the target commit.\nLocal tracked changes after the target commit are discarded.\nThis is a destructive operation."
},
"keep": {
"label": "--keep",
"description": "Move HEAD to the target commit and keep local changes when possible.\nOnly non-conflicting local changes are preserved.\nIf conflicts are detected, reset aborts to protect your work."
}
}
}
}
},
"gitChangesTab": {

View File

@@ -1181,6 +1181,8 @@
"loadingBranches": "Cargando ramas...",
"noContainingBranches": "No se encontraron ramas contenedoras.",
"newBranch": "Nueva rama...",
"resetToHere": "Resetear aquí",
"resetDisabledReasonNotCurrentBranchView": "Disponible solo al ver la rama actual",
"viewCommitDiffAria": "Ver diff del commit {hash}",
"copyFullCommitHashAria": "Copiar hash completo del commit {hash}",
"pushStatus": {
@@ -1199,7 +1201,10 @@
"createdAndSwitchedNewBranch": "Nueva rama creada y activada",
"newBranchFromCommit": "{name} (desde {shortHash})",
"createBranchFailed": "No se pudo crear la rama",
"openPushWindowFailed": "No se pudo abrir la ventana de envío"
"openPushWindowFailed": "No se pudo abrir la ventana de envío",
"resetSuccess": "Reset completado",
"resetSuccessDescription": "{branch} se reseteó a {shortHash} con {mode}",
"resetFailed": "Falló el reset"
},
"branchSelector": {
"selectBranchPlaceholder": "Seleccionar rama...",
@@ -1211,7 +1216,33 @@
"dialogs": {
"newBranchTitle": "Nueva rama",
"newBranchDescription": "Crea una nueva rama con el commit {shortHash} como último commit.",
"branchNamePlaceholder": "Nombre de la rama"
"branchNamePlaceholder": "Nombre de la rama",
"reset": {
"title": "Resetear la rama actual hasta aquí",
"branchLabel": "Rama",
"targetLabel": "Commit objetivo",
"messageLabel": "Mensaje",
"modeLabel": "Modo de reset",
"confirmButton": "Resetear",
"modes": {
"soft": {
"label": "--soft",
"description": "Mueve HEAD y el puntero de la rama actual al commit objetivo.\nMantiene Index y Working Tree sin cambios.\nLos cambios de los commits retirados permanecen en estado staged."
},
"mixed": {
"label": "--mixed (predeterminado)",
"description": "Mueve HEAD al commit objetivo.\nResetea Index al commit objetivo y mantiene los cambios en Working Tree.\nLos cambios pasan de staged a unstaged."
},
"hard": {
"label": "--hard",
"description": "Mueve HEAD y resetea tanto Index como Working Tree al commit objetivo.\nSe descartan los cambios locales rastreados posteriores al commit objetivo.\nEs una operación destructiva."
},
"keep": {
"label": "--keep",
"description": "Mueve HEAD al commit objetivo e intenta conservar los cambios locales.\nSolo se conservan cambios que no entren en conflicto.\nSi hay conflictos, el reset se aborta para proteger tu trabajo."
}
}
}
}
},
"gitChangesTab": {

View File

@@ -1181,6 +1181,8 @@
"loadingBranches": "Chargement des branches...",
"noContainingBranches": "Aucune branche contenant ce commit.",
"newBranch": "Nouvelle branche...",
"resetToHere": "Réinitialiser ici",
"resetDisabledReasonNotCurrentBranchView": "Disponible uniquement en affichant la branche actuelle",
"viewCommitDiffAria": "Voir le diff du commit {hash}",
"copyFullCommitHashAria": "Copier le hash complet du commit {hash}",
"pushStatus": {
@@ -1199,7 +1201,10 @@
"createdAndSwitchedNewBranch": "Nouvelle branche créée et activée",
"newBranchFromCommit": "{name} (depuis {shortHash})",
"createBranchFailed": "Échec de la création de la branche",
"openPushWindowFailed": "Échec de l'ouverture de la fenêtre de push"
"openPushWindowFailed": "Échec de l'ouverture de la fenêtre de push",
"resetSuccess": "Réinitialisation réussie",
"resetSuccessDescription": "{branch} a été réinitialisée sur {shortHash} avec {mode}",
"resetFailed": "Échec de la réinitialisation"
},
"branchSelector": {
"selectBranchPlaceholder": "Sélectionner une branche...",
@@ -1211,7 +1216,33 @@
"dialogs": {
"newBranchTitle": "Nouvelle branche",
"newBranchDescription": "Créer une nouvelle branche avec le commit {shortHash} comme dernier commit.",
"branchNamePlaceholder": "Nom de la branche"
"branchNamePlaceholder": "Nom de la branche",
"reset": {
"title": "Réinitialiser la branche actuelle jusquici",
"branchLabel": "Branche",
"targetLabel": "Commit cible",
"messageLabel": "Message",
"modeLabel": "Mode de réinitialisation",
"confirmButton": "Réinitialiser",
"modes": {
"soft": {
"label": "--soft",
"description": "Déplace HEAD et le pointeur de la branche actuelle vers le commit cible.\nConserve Index et Working Tree inchangés.\nLes changements des commits retirés restent staged."
},
"mixed": {
"label": "--mixed (par défaut)",
"description": "Déplace HEAD vers le commit cible.\nRéinitialise Index au commit cible tout en conservant les changements du Working Tree.\nLes changements passent de staged à unstaged."
},
"hard": {
"label": "--hard",
"description": "Déplace HEAD et réinitialise à la fois Index et Working Tree au commit cible.\nLes changements locaux suivis après le commit cible sont supprimés.\nCest une opération destructive."
},
"keep": {
"label": "--keep",
"description": "Déplace HEAD vers le commit cible en conservant les changements locaux quand cest possible.\nSeuls les changements sans conflit sont conservés.\nEn cas de conflit, la réinitialisation est annulée pour protéger votre travail."
}
}
}
}
},
"gitChangesTab": {

View File

@@ -1181,6 +1181,8 @@
"loadingBranches": "ブランチを読み込み中...",
"noContainingBranches": "含まれるブランチが見つかりません。",
"newBranch": "新規ブランチ...",
"resetToHere": "ここにリセット",
"resetDisabledReasonNotCurrentBranchView": "現在のブランチ表示時のみ利用できます",
"viewCommitDiffAria": "コミット {hash} の差分を表示",
"copyFullCommitHashAria": "完全なコミットハッシュ {hash} をコピー",
"pushStatus": {
@@ -1199,7 +1201,10 @@
"createdAndSwitchedNewBranch": "新しいブランチを作成して切り替えました",
"newBranchFromCommit": "{name}{shortHash} から)",
"createBranchFailed": "ブランチ作成に失敗しました",
"openPushWindowFailed": "プッシュウィンドウを開けませんでした"
"openPushWindowFailed": "プッシュウィンドウを開けませんでした",
"resetSuccess": "リセットが完了しました",
"resetSuccessDescription": "{branch} を {mode} で {shortHash} にリセットしました",
"resetFailed": "リセットに失敗しました"
},
"branchSelector": {
"selectBranchPlaceholder": "ブランチを選択...",
@@ -1211,7 +1216,33 @@
"dialogs": {
"newBranchTitle": "新規ブランチ",
"newBranchDescription": "コミット {shortHash} を最新コミットとして新しいブランチを作成します。",
"branchNamePlaceholder": "ブランチ名"
"branchNamePlaceholder": "ブランチ名",
"reset": {
"title": "現在のブランチをこのコミットへリセット",
"branchLabel": "ブランチ",
"targetLabel": "対象コミット",
"messageLabel": "コミットメッセージ",
"modeLabel": "リセットモード",
"confirmButton": "リセット",
"modes": {
"soft": {
"label": "--soft",
"description": "HEAD と現在のブランチ参照を対象コミットへ移動します。\nIndex と Working Tree は変更しません。\n取り消されたコミットの変更は staged のまま残ります。"
},
"mixed": {
"label": "--mixedデフォルト",
"description": "HEAD を対象コミットへ移動します。\nIndex を対象コミットに戻し、Working Tree の変更は維持します。\n変更は staged から unstaged に戻ります。"
},
"hard": {
"label": "--hard",
"description": "HEAD を移動し、Index と Working Tree を対象コミットに戻します。\n対象コミット以降の追跡中ローカル変更は破棄されます。\n破壊的な操作です。"
},
"keep": {
"label": "--keep",
"description": "HEAD を対象コミットへ移動し、可能な限りローカル変更を保持します。\n競合しない変更のみ保持されます。\n競合がある場合は保護のため処理を中止します。"
}
}
}
}
},
"gitChangesTab": {

View File

@@ -1181,6 +1181,8 @@
"loadingBranches": "브랜치 로딩 중...",
"noContainingBranches": "포함하는 브랜치를 찾을 수 없습니다.",
"newBranch": "새 브랜치...",
"resetToHere": "여기로 리셋",
"resetDisabledReasonNotCurrentBranchView": "현재 브랜치 보기에서만 사용할 수 있습니다",
"viewCommitDiffAria": "커밋 {hash}의 diff 보기",
"copyFullCommitHashAria": "전체 커밋 해시 {hash} 복사",
"pushStatus": {
@@ -1199,7 +1201,10 @@
"createdAndSwitchedNewBranch": "새 브랜치를 생성하고 전환했습니다",
"newBranchFromCommit": "{name} ({shortHash}에서 생성)",
"createBranchFailed": "브랜치 생성에 실패했습니다",
"openPushWindowFailed": "푸시 창을 열지 못했습니다"
"openPushWindowFailed": "푸시 창을 열지 못했습니다",
"resetSuccess": "리셋 완료",
"resetSuccessDescription": "{branch}을(를) {mode}로 {shortHash}에 리셋했습니다",
"resetFailed": "리셋 실패"
},
"branchSelector": {
"selectBranchPlaceholder": "브랜치 선택...",
@@ -1211,7 +1216,33 @@
"dialogs": {
"newBranchTitle": "새 브랜치",
"newBranchDescription": "커밋 {shortHash}를 최신 커밋으로 하여 새 브랜치를 생성합니다.",
"branchNamePlaceholder": "브랜치 이름"
"branchNamePlaceholder": "브랜치 이름",
"reset": {
"title": "현재 브랜치를 이 커밋으로 리셋",
"branchLabel": "브랜치",
"targetLabel": "대상 커밋",
"messageLabel": "커밋 메시지",
"modeLabel": "리셋 모드",
"confirmButton": "리셋",
"modes": {
"soft": {
"label": "--soft",
"description": "HEAD와 현재 브랜치 포인터를 대상 커밋으로 이동합니다.\nIndex와 Working Tree는 변경하지 않습니다.\n되돌려진 커밋의 변경 사항은 staged 상태로 유지됩니다."
},
"mixed": {
"label": "--mixed (기본값)",
"description": "HEAD를 대상 커밋으로 이동합니다.\nIndex를 대상 커밋으로 되돌리고 Working Tree 변경은 유지합니다.\n변경 사항은 staged에서 unstaged로 바뀝니다."
},
"hard": {
"label": "--hard",
"description": "HEAD를 이동하고 Index와 Working Tree를 모두 대상 커밋으로 되돌립니다.\n대상 커밋 이후의 추적된 로컬 변경은 삭제됩니다.\n파괴적인 작업입니다."
},
"keep": {
"label": "--keep",
"description": "HEAD를 대상 커밋으로 이동하면서 가능한 한 로컬 변경을 유지합니다.\n충돌하지 않는 변경만 보존됩니다.\n충돌이 감지되면 작업 보호를 위해 리셋이 중단됩니다."
}
}
}
}
},
"gitChangesTab": {

View File

@@ -1181,6 +1181,8 @@
"loadingBranches": "Carregando branches...",
"noContainingBranches": "Nenhuma branch contendo este commit foi encontrada.",
"newBranch": "Nova branch...",
"resetToHere": "Resetar para aqui",
"resetDisabledReasonNotCurrentBranchView": "Disponível somente ao visualizar a branch atual",
"viewCommitDiffAria": "Ver diff do commit {hash}",
"copyFullCommitHashAria": "Copiar hash completo do commit {hash}",
"pushStatus": {
@@ -1199,7 +1201,10 @@
"createdAndSwitchedNewBranch": "Nova branch criada e selecionada",
"newBranchFromCommit": "{name} (de {shortHash})",
"createBranchFailed": "Falha ao criar branch",
"openPushWindowFailed": "Falha ao abrir a janela de push"
"openPushWindowFailed": "Falha ao abrir a janela de push",
"resetSuccess": "Reset concluído",
"resetSuccessDescription": "{branch} foi resetada para {shortHash} com {mode}",
"resetFailed": "Falha no reset"
},
"branchSelector": {
"selectBranchPlaceholder": "Selecionar branch...",
@@ -1211,7 +1216,33 @@
"dialogs": {
"newBranchTitle": "Nova branch",
"newBranchDescription": "Criar uma nova branch com o commit {shortHash} como commit mais recente.",
"branchNamePlaceholder": "Nome da branch"
"branchNamePlaceholder": "Nome da branch",
"reset": {
"title": "Resetar a branch atual para este commit",
"branchLabel": "Branch",
"targetLabel": "Commit alvo",
"messageLabel": "Mensagem",
"modeLabel": "Modo de reset",
"confirmButton": "Resetar",
"modes": {
"soft": {
"label": "--soft",
"description": "Move o HEAD e o ponteiro da branch atual para o commit alvo.\nMantém Index e Working Tree sem alterações.\nAs mudanças dos commits removidos permanecem staged."
},
"mixed": {
"label": "--mixed (padrão)",
"description": "Move o HEAD para o commit alvo.\nReseta o Index para o commit alvo e mantém as mudanças no Working Tree.\nAs mudanças passam de staged para unstaged."
},
"hard": {
"label": "--hard",
"description": "Move o HEAD e reseta tanto Index quanto Working Tree para o commit alvo.\nAs mudanças locais rastreadas após o commit alvo são descartadas.\nEsta é uma operação destrutiva."
},
"keep": {
"label": "--keep",
"description": "Move o HEAD para o commit alvo e tenta preservar alterações locais.\nSomente alterações sem conflito são mantidas.\nSe houver conflito, o reset é abortado para proteger seu trabalho."
}
}
}
}
},
"gitChangesTab": {

View File

@@ -1181,6 +1181,8 @@
"loadingBranches": "正在加载分支...",
"noContainingBranches": "未找到包含此提交的分支。",
"newBranch": "新建分支...",
"resetToHere": "重置到此处",
"resetDisabledReasonNotCurrentBranchView": "仅在查看当前分支时可用",
"viewCommitDiffAria": "查看提交 {hash} 的差异",
"copyFullCommitHashAria": "复制完整提交哈希 {hash}",
"pushStatus": {
@@ -1199,7 +1201,10 @@
"createdAndSwitchedNewBranch": "已创建并切换到新分支",
"newBranchFromCommit": "{name}(来自 {shortHash}",
"createBranchFailed": "新建分支失败",
"openPushWindowFailed": "打开推送窗口失败"
"openPushWindowFailed": "打开推送窗口失败",
"resetSuccess": "重置成功",
"resetSuccessDescription": "已将 {branch} 以 {mode} 重置到 {shortHash}",
"resetFailed": "重置失败"
},
"branchSelector": {
"selectBranchPlaceholder": "选择分支...",
@@ -1211,7 +1216,33 @@
"dialogs": {
"newBranchTitle": "新建分支",
"newBranchDescription": "以提交 {shortHash} 作为最后提交创建新分支。",
"branchNamePlaceholder": "分支名称"
"branchNamePlaceholder": "分支名称",
"reset": {
"title": "将当前分支重置到此提交",
"branchLabel": "分支",
"targetLabel": "目标提交",
"messageLabel": "提交信息",
"modeLabel": "重置模式",
"confirmButton": "重置",
"modes": {
"soft": {
"label": "--soft",
"description": "将 HEAD 和当前分支指针移动到目标提交。\n暂存区Index和工作区Working Tree保持不变。\n被回退提交对应的改动会保留为“已暂存”状态。"
},
"mixed": {
"label": "--mixed默认",
"description": "将 HEAD 移动到目标提交。\n把暂存区重置为目标提交状态但保留工作区改动。\n这些改动会从“已暂存”变为“未暂存”。"
},
"hard": {
"label": "--hard",
"description": "将 HEAD、暂存区和工作区全部重置到目标提交。\n目标提交之后的本地已跟踪改动会被直接丢弃。\n这是破坏性操作。"
},
"keep": {
"label": "--keep",
"description": "将 HEAD 移动到目标提交,并尽量保留本地改动。\n仅当本地改动与目标提交不冲突时才会保留。\n若存在冲突操作会中止以避免覆盖你的修改。"
}
}
}
}
},
"gitChangesTab": {

View File

@@ -1181,6 +1181,8 @@
"loadingBranches": "正在載入分支...",
"noContainingBranches": "未找到包含此提交的分支。",
"newBranch": "新增分支...",
"resetToHere": "重設到此處",
"resetDisabledReasonNotCurrentBranchView": "僅在檢視目前分支時可用",
"viewCommitDiffAria": "查看提交 {hash} 的差異",
"copyFullCommitHashAria": "複製完整提交雜湊 {hash}",
"pushStatus": {
@@ -1199,7 +1201,10 @@
"createdAndSwitchedNewBranch": "已建立並切換到新分支",
"newBranchFromCommit": "{name}(來自 {shortHash}",
"createBranchFailed": "新增分支失敗",
"openPushWindowFailed": "開啟推送視窗失敗"
"openPushWindowFailed": "開啟推送視窗失敗",
"resetSuccess": "重設成功",
"resetSuccessDescription": "已將 {branch} 以 {mode} 重設到 {shortHash}",
"resetFailed": "重設失敗"
},
"branchSelector": {
"selectBranchPlaceholder": "選擇分支...",
@@ -1211,7 +1216,33 @@
"dialogs": {
"newBranchTitle": "新增分支",
"newBranchDescription": "以提交 {shortHash} 作為最後提交建立新分支。",
"branchNamePlaceholder": "分支名稱"
"branchNamePlaceholder": "分支名稱",
"reset": {
"title": "將目前分支重設到此提交",
"branchLabel": "分支",
"targetLabel": "目標提交",
"messageLabel": "提交訊息",
"modeLabel": "重設模式",
"confirmButton": "重設",
"modes": {
"soft": {
"label": "--soft",
"description": "將 HEAD 與目前分支指標移動到目標提交。\n暫存區Index與工作區Working Tree保持不變。\n被回退提交的變更會保留為「已暫存」。"
},
"mixed": {
"label": "--mixed預設",
"description": "將 HEAD 移動到目標提交。\n把暫存區重設為目標提交狀態但保留工作區變更。\n這些變更會由「已暫存」變成「未暫存」。"
},
"hard": {
"label": "--hard",
"description": "將 HEAD、暫存區與工作區全部重設到目標提交。\n目標提交之後的本地已追蹤變更會被直接捨棄。\n這是破壞性操作。"
},
"keep": {
"label": "--keep",
"description": "將 HEAD 移動到目標提交,並盡可能保留本地變更。\n僅保留與目標提交不衝突的本地變更。\n若檢測到衝突操作會中止以保護你的修改。"
}
}
}
}
},
"gitChangesTab": {