12

I don't know how I did this, but the Source Control icon on the left hand vertical menu of Visual Studio Code has gone missing on my work Mac. On my personal Mac it's still there, so I must have inadvertently done something to remove it from my work Mac.

How can I get the Source Control icon back?

4 Answers 4

25

Right-click on the sidebar (any part of the sidebar) and you will see this:

enter image description here

From the menu, enable "Source Control" from there.

As an alternative, as the screenshot says, you can also toggle showing/hiding the "Source Control" panel via its keyboard shortcut (in case it has changed with recent versions, look it up from the full keyboard shortcuts list):

  • CTRL+SHIFT+G G on Windows/Linux
  • CTRL+SHIFT+G on Mac

Then once it appears, you can drag it back to the sidebar and then do the same steps described above to toggle it to be always displayed.

2
  • 14
    This answer "sort of" worked. Right clicking in the Sidebar Icons didn't show a selection to enable the source control tool. However, "CTRL-SHIFT-G" opened the source control tool in the explorer, and then dragging the words "Source Control" to the Sidebar added the icon back in. :)
    – writes_on
    Commented Oct 8, 2020 at 15:11
  • 3
    Indeed, the @writes_on solution worked for me, where you drag the source control to the side bar helped me. I couldnt find the option right clicking on the side bar. Commented Jun 14, 2023 at 2:37
10

For me, oddly there is no menu option, context menu, settings option, or really anything else. I tried disabling every extension to fix it, but when I right-click, as in the other answer, "Source Control" does NOT appear.

It seems the functions for "Source Control" are now in the Explorer Panel.

Drag that over back to the gutter and it's fixed.

3
  • 1
    This is so weird, I just checked on the latest VScode 1.59 fresh install on windows and the menu still appears
    – tHeSiD
    Commented Sep 2, 2021 at 7:25
  • 2
    This also happened to me. Inadvertedly dragged the source control icon inside search panel. Commented Nov 12, 2022 at 7:59
  • Same as @XaviGuardia, I had dragged the source control icon inside search panel. Commented Feb 27, 2023 at 20:19
1

Open the Command Palette:

  • For Windows or Linux, CTRL+SHIFT+P
  • For Mac, CMD+SHIFT+P

Then write "source control", then add it.

image of VS Code command palette with "source control"

1

You can show the "Source Control" panel with a keyboard shortcut:

  • For Windows, press CTRL+SHIFT+G then G afterwards
  • For Mac, CTRL+SHIFT+G

Once it's displayed, from there you can drag it to your menu bar.

Not the answer you're looking for? Browse other questions tagged or ask your own question.