1

I have been using Atom's git integration for a long time. Now that it's gone obsolete, I switched to vscode, whose git integration is if not terrible in comparison, at least different.

One of the differences is that when I'm behind the remote and want to push, when Atom's git integration realizes it's behind, it aborts and just does a fetch (not even a merge), informing me of it and letting me decide what to do. VSCode instead does a merge without asking me anything, and even pushes all that to the remote without any kind of confirmation from me.

Is there a way to disable this and do it atom-style ?

Gouvernathor
  • 92
  • 1
  • 12

1 Answers1

1

The only VSCode operation which would do "an automatic merge followed by an automatic puSH when I only asked for a simple push" is the sync option, which, as explained here, does a pull (fetch + merge), followed by a pull.

sync

Make sure your Git post-commit command is not set to sync or push, or you would experience a pull and/or push after each commit!

You can still do a push only through the three-dot menu, as explained in "How to commit and push your changes to your GitHub repository in VScode" from ZeroesAndOnes:

https://miro.medium.com/v2/resize:fit:1100/format:webp/1*fEymXmfqPwsolwGuGFvMIQ.png

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Ok, is there a way to prevent the Sync action from doing the merge and still pushing when it finds out I'm behind the remote ? Or is the only safe available option, to use the menu every time ? – Gouvernathor Feb 12 '23 at 13:58
  • 1
    @Gouvernathor If you type Ctrl+, (comma), et "Sync", you will see all the sync settings. To my knowledge, a sync always does a pull then push. I have set "Confirm Sync" to true, in order to be at least aware of what it is about to do. For a push alone, the menu remains the best option. – VonC Feb 12 '23 at 14:11
  • I did the same, and lodged a feature-request issue on their github repo. thx – Gouvernathor Feb 12 '23 at 18:54
  • 2
    @Gouvernathor Well done. I will follow [issue 174198](https://github.com/microsoft/vscode/issues/174198) with interest. – VonC Feb 12 '23 at 18:58