Home > database >  How do I get rid of the "Sync Changes 1 ↑" button in VS Code?
How do I get rid of the "Sync Changes 1 ↑" button in VS Code?

Time:12-17

Lately, for some reason, I've had to press this button every time I want to push a change to my GitHub repository:

enter image description here

I can't remember if there's a setting I've accidentally toggled.

I also never make changes to my repository outside my VS Code environment.

I'm using a Gatsby/GitHub/Netlify setup.

What's causing this button to appear every time? How do I get rid of it?

CodePudding user response:

This feature was added in the September 2020 / version 1.61 update to Visual Studio Code and can be found on the release notes at https://code.visualstudio.com/updates/v1_61#_publish-or-sync-action-button-for-git-repositories.

The behaviour of this button can be adjusted in the VS Code settings, the setting is named "git: show unpublished commits button" with the options 'always', 'whenEmpty' and 'never'. The default is 'whenEmpty' so the button appears when there are unpublished changes, but no uncommitted changes. For your purposes I believe you would want to use the 'never' option.

Alternatively it can be set directly in settings.json as:

"git.showUnpublishedCommitsButton": "never"
  • Related