Title pretty much says it. I work with multiple computers and have forgotten to commit (or more likely, push) my latest changes when I leave a workstation. Since I shut down the workstation most of the time, I'd like a way to automatically commit any saved changes and push any staged changes when closing my VS code window. Is this possible? I can't tell if there's any way to tell VSCode to execute a command on closing the window.
Asked
Active
Viewed 418 times
1
-
1Look at [this](https://stackoverflow.com/questions/34719129/visual-studio-code-push-automatically/47962330) question and also maybe [this](https://stackoverflow.com/questions/53956236/visual-studio-code-automatic-commit-git) one. – SwissCodeMen Jul 22 '21 at 21:05
-
I've seen those and I like the idea, but I don't like littering in my git repository unless I have to (also I don't want to use CI time more than necessary)-- I might resort to one of those solutions if there isn't a way to do this, but I'm ideally looking more for something like the behavior when you try to close a window without saving, or (less ideally) it just commits and pushes automatically without opening a dialog box. – Danny Jul 23 '21 at 13:42