diff --git a/extensions/git/src/commands.ts b/extensions/git/src/commands.ts index 08b020afd35..80fad68410e 100644 --- a/extensions/git/src/commands.ts +++ b/extensions/git/src/commands.ts @@ -1174,6 +1174,19 @@ export class CommandCenter { await repository.sync(); } + @command('git._syncAll') + async syncAll(): Promise { + await Promise.all(this.model.repositories.map(async repository => { + const HEAD = repository.HEAD; + + if (!HEAD || !HEAD.upstream) { + return; + } + + await repository.sync(); + })); + } + @command('git.publish', { repository: true }) async publish(repository: Repository): Promise { const remotes = repository.remotes;