diff --git a/extensions/git/src/commands.ts b/extensions/git/src/commands.ts index 8138e0c1533..cdc048a1234 100644 --- a/extensions/git/src/commands.ts +++ b/extensions/git/src/commands.ts @@ -1472,7 +1472,10 @@ export class CommandCenter { } private async _stash(repository: Repository, includeUntracked = false): Promise { - if (repository.workingTreeGroup.resourceStates.length === 0) { + const noUnstagedChanges = repository.workingTreeGroup.resourceStates.length === 0; + const noStagedChanges = repository.indexGroup.resourceStates.length === 0; + + if (noUnstagedChanges && noStagedChanges) { window.showInformationMessage(localize('no changes stash', "There are no changes to stash.")); return; }