Automatically Git Commit and Push Changes on File Save in VS Code

,

If you do not need to write proper customize commit message, you might want to avoid hassle to write command and message every time to commit and push the changes. This happened to me while I decided to save notes in my GitHub repository.

Fortunately, I found really amazing extension to handle it. Fun fact: I implemented it in my repository and forget how I did it. It took me a few weeks to find out that I used this plugin.

Let’s introduce this legendary VS Code extension.

GitDocs

How to Install GitDocs extension in VS Code

  1. In VS Code editor, go to Views > Extensions or simply enter Ctrl + Shift + X in the keyboard.
  2. In the search field available at the extension panel, type GitDoc.
  3. You should find an extension of the same name by Jonathan Carter.
  4. Click over it and click the Install button available.

How to Use GitDocs Extension

  1. Open your git repository project in the VS Code.
  2. Hit Ctrl + Shift + P to run/search commands
  3. Type gitdoc in the command field.
  4. You should see GitDoc: Enable just below it.
  5. Simply hit Enter in the keyboard to activate GitDocs in the project.
  6. Now, make changes in the repository folder and save changes. Wait for a while (approx. 3/4 seconds).
  7. You can see the automatic actions GitDocs perform in the Source Control panel by hitting Ctrl + Shift + G.
Loading spinner

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.