Change:
Issue Type: <bBug</bDuring a rebase (not sure if that's the only scenario), my SOURCE CONTROL tab display three sections, MERGE CHANGES, STAGED CHANGES and CHANGES. If I click the + button on the CHANGES section, in order to stage all items below CHANGES, VS Code also adds everything on MERGE CHANGES. VS Code version: Code - Insiders 1.45.0-insider (, 2020-04-29T05:33:59.143Z) OS version: WindowsNT x64 10.0. <details<summarySystem Info</summary </details<details<summaryExtensions (19)</summaryExtensionVersion ------ markdown-mermaid1.5.0 better-toml0.3.2 vscode-eslint2.1.5 gitlens10.2.1 plantuml2.13.8 svg1.1.8 vscode-peacock3.7.0 chat0.33.0 rust-analyzer0.2.151 vscode-todo-parser1.9.1 remote-wsl0.44.2 vsliveshare1.0.2104 vsliveshare-audio0.1.85 vsliveshare-pack0.3.4 vscode-xml0.11.0 vscode-yaml0.7.2 crates0.4.9 vscode-hexdump1.7.2 markdown-all-in-one2.8.0 </details<!-- generated by issue reporter --
Hello I would like to work on this issue if no one else is. Regards.
hey could you please review the pr that I have opened and also could you please suggest any changes if required.
Hi I'm also working on this issue. You can check my PR
I have gone through your PR also left a comment.

Discussion:
"icon": "$(add)" }, { <ins> "command": "git.stageAllMerge", "title": "%command.stageAllMerge%", "category": "Git", "icon": "$(add)" }, { </ins> "command": "git.stageSelectedRanges", "title": "%command.stageSelectedRanges%", "category": "Git"

"when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" }, { <ins> "command": "git.stageAllMerge", "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" }, { </ins> "command": "git.stageSelectedRanges", "when": "config.git.enabled && !git.missing && gitOpenRepositoryCount != 0" },

"when": "scmProvider == git" }, { <ins> "command": "git.stageAllMerge", "group": "5_stage", "when": "scmProvider == git" }, { </ins> "command": "git.unstageAll", "group": "5_stage", "when": "scmProvider == git"

], "scm/resourceGroup/context": [ { <del> "command": "git.stageAll", </del> <ins> "command": "git.stageAllMerge", </ins> "when": "scmProvider == git && scmResourceGroup == merge", "group": "1_modification" }, { <del> "command": "git.stageAll", </del> <ins> "command": "git.stageAllMerge", </ins> "when": "scmProvider == git && scmResourceGroup == merge", "group": "inline" },

"command.stageAll": "Stage All Changes", "command.stageAllTracked": "Stage All Tracked Changes", "command.stageAllUntracked": "Stage All Untracked Changes", <ins> "command.stageAllMerge": "Stage All Merge Changes", </ins> "command.stageSelectedRanges": "Stage Selected Ranges", "command.revertSelectedRanges": "Revert Selected Ranges", "command.stageChange": "Stage Change",

@command('git.stageAll', { repository: true }) async stageAll(repository: Repository): Promise<void> { <del> const resources = repository.mergeGroup.resourceStates.filter(s => s instanceof Resource) as Resource[]; const { merge, unresolved, deletionConflicts } = await categorizeResourceByResolution(resources); try { for (const deletionConflict of deletionConflicts) { await this._stageDeletionConflict(repository, deletionConflict.resourceUri); } } catch (err) { if (/Cancelled/.test(err.message)) { return; } throw err; } if (unresolved.length > 0) { const message = unresolved.length > 1 ? localize('confirm stage files with merge conflicts', "Are you sure you want to stage {0} files with merge conflicts?", merge.length) : localize('confirm stage file with merge conflicts', "Are you sure you want to stage {0} with merge conflicts?", path.basename(merge[0].resourceUri.fsPath)); const yes = localize('yes', "Yes"); const pick = await window.showWarningMessage(message, { modal: true }, yes); </del> <ins> const resources = [...repository.workingTreeGroup.resourceStates, ...repository.untrackedGroup.resourceStates]; const uris = resources.map(r => r.resourceUri); </ins> <del> if (pick !== yes) { return; } </del> <ins> if (uris.length > 0) { const config = workspace.getConfiguration('git', Uri.file(repository.root)); const untrackedChanges = config.get<'mixed' | 'separate' | 'hidden'>('untrackedChanges'); await repository.add(uris, untrackedChanges === 'mixed' ? undefined : { update: true }); </ins> } <del> const config = workspace.getConfiguration('git', Uri.file(repository.root)); const untrackedChanges = config.get<'mixed' | 'separate' | 'hidden'>('untrackedChanges'); await repository.add([], untrackedChanges === 'mixed' ? undefined : { update: true }); </del> } private async _stageDeletionConflict(repository: Repository, uri: Uri): Promise<void> {

await repository.add(uris); } <ins> @command('git.stageAllMerge', { repository: true }) async stageAllMerge(repository: Repository): Promise<void> { const resources = repository.mergeGroup.resourceStates.filter(s => s instanceof Resource) as Resource[]; const { merge, unresolved, deletionConflicts } = await categorizeResourceByResolution(resources); try { for (const deletionConflict of deletionConflicts) { await this._stageDeletionConflict(repository, deletionConflict.resourceUri); } } catch (err) { if (/Cancelled/.test(err.message)) { return; } throw err; } if (unresolved.length > 0) { const message = unresolved.length > 1 ? localize('confirm stage files with merge conflicts', "Are you sure you want to stage {0} files with merge conflicts?", merge.length) : localize('confirm stage file with merge conflicts', "Are you sure you want to stage {0} with merge conflicts?", path.basename(merge[0].resourceUri.fsPath)); const yes = localize('yes', "Yes"); const pick = await window.showWarningMessage(message, { modal: true }, yes); if (pick !== yes) { return; } } const uris = resources.map(r => r.resourceUri); if (uris.length > 0) { await repository.add(uris); } } </ins> @command('git.stageChange') async stageChange(uri: Uri, changes: LineChange[], index: number): Promise<void> { const textEditor = window.visibleTextEditors.filter(e => e.document.uri.toString() === uri.toString())[0];