diff --git a/extensions/git/package.json b/extensions/git/package.json index 0a35bf6205686..2ec16dddfe919 100644 --- a/extensions/git/package.json +++ b/extensions/git/package.json @@ -220,6 +220,11 @@ "title": "%command.commitAllAmend%", "category": "Git" }, + { + "command": "git.restoreCommitTemplate", + "title": "%command.restoreCommitTemplate%", + "category": "Git" + }, { "command": "git.undoCommit", "title": "%command.undoCommit%", @@ -476,6 +481,10 @@ "command": "git.commitAllAmend", "when": "config.git.enabled && gitOpenRepositoryCount != 0" }, + { + "command": "git.restoreCommitTemplate", + "when": "false" + }, { "command": "git.undoCommit", "when": "config.git.enabled && gitOpenRepositoryCount != 0" diff --git a/extensions/git/package.nls.json b/extensions/git/package.nls.json index b87fb550b7404..4cdad3cbcb758 100644 --- a/extensions/git/package.nls.json +++ b/extensions/git/package.nls.json @@ -28,6 +28,7 @@ "command.commitAll": "Commit All", "command.commitAllSigned": "Commit All (Signed Off)", "command.commitAllAmend": "Commit All (Amend)", + "command.restoreCommitTemplate": "Restore Commit Template", "command.undoCommit": "Undo Last Commit", "command.checkout": "Checkout to...", "command.branch": "Create Branch...", diff --git a/extensions/git/src/commands.ts b/extensions/git/src/commands.ts index ede427e1a5ee1..a949d88e69afd 100755 --- a/extensions/git/src/commands.ts +++ b/extensions/git/src/commands.ts @@ -1238,6 +1238,11 @@ export class CommandCenter { await this.commitWithAnyInput(repository, { empty: true }); } + @command('git.restoreCommitTemplate', { repository: true }) + async restoreCommitTemplate(repository: Repository): Promise { + repository.inputBox.value = await repository.getCommitTemplate(); + } + @command('git.undoCommit', { repository: true }) async undoCommit(repository: Repository): Promise { const HEAD = repository.HEAD;