Visual studio code: automatic commit git












2














Many times, I forget to commit my edits to my git. And if I closed VSCode, I can't use ctrl-Z anymore.
Because, I have git set up, I thought I could use something like an automatic commit every 30sec or so.



I have seen this extension btu ti's not open source, so I don't want to use it. I also found this but my programming skills aren't good enough to implement it.



I also wonder if using git in this way is a good option, as the git folder may get really heavy quickly (my git is only local, so I can handle a couple of gigab)



So what is the best way to achieve what I want to do?










share|improve this question



























    2














    Many times, I forget to commit my edits to my git. And if I closed VSCode, I can't use ctrl-Z anymore.
    Because, I have git set up, I thought I could use something like an automatic commit every 30sec or so.



    I have seen this extension btu ti's not open source, so I don't want to use it. I also found this but my programming skills aren't good enough to implement it.



    I also wonder if using git in this way is a good option, as the git folder may get really heavy quickly (my git is only local, so I can handle a couple of gigab)



    So what is the best way to achieve what I want to do?










    share|improve this question

























      2












      2








      2


      2





      Many times, I forget to commit my edits to my git. And if I closed VSCode, I can't use ctrl-Z anymore.
      Because, I have git set up, I thought I could use something like an automatic commit every 30sec or so.



      I have seen this extension btu ti's not open source, so I don't want to use it. I also found this but my programming skills aren't good enough to implement it.



      I also wonder if using git in this way is a good option, as the git folder may get really heavy quickly (my git is only local, so I can handle a couple of gigab)



      So what is the best way to achieve what I want to do?










      share|improve this question













      Many times, I forget to commit my edits to my git. And if I closed VSCode, I can't use ctrl-Z anymore.
      Because, I have git set up, I thought I could use something like an automatic commit every 30sec or so.



      I have seen this extension btu ti's not open source, so I don't want to use it. I also found this but my programming skills aren't good enough to implement it.



      I also wonder if using git in this way is a good option, as the git folder may get really heavy quickly (my git is only local, so I can handle a couple of gigab)



      So what is the best way to achieve what I want to do?







      git visual-studio-code backup revision-history






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Dec 28 '18 at 9:24









      MagTunMagTun

      1,87822440




      1,87822440
























          2 Answers
          2






          active

          oldest

          votes


















          3















          I also wonder if using git in this way is a good option




          No, that would pollute the history of your commits.



          Using the extension "Local history" is a better approach, and does not rely on your VCS.

          (and is open-source: github.com/zabel-xyz/local-history)




          Every time you modify a file, a copy of the old contents is kept in the local history.

          At any time, you can compare a file with any older version from the history.

          It can help you out when you change or delete a file by accident.

          The history can also help you out when your workspace has a catastrophic problem.







          share|improve this answer





















          • Thanks a lot for this, it's a better option! Only thing is that Local History only save the file when I save it, not when I make an edit in VScode. I have seen the .saveDelay but it only works on save
            – MagTun
            Dec 28 '18 at 10:15






          • 1




            @MagTun Yes, that is why you need to activate gile auto.save: code.visualstudio.com/docs/editor/codebasics#_save-auto-save. That way, you won't even have to type CTRL+S
            – VonC
            Dec 28 '18 at 16:09



















          0














          I am the developer of auto-git. It's not open-source yet, but will be in the future. It detects within a specified interval all changes and will push it to the predefined remote with a static Auto-Git commit. I am still working on it to improve the functionality of the extension.



          Note: The link of the extension in the OT does not work anymore because change of publisher. Please use auto-git instead. Thank you.






          share|improve this answer










          New contributor




          Ray is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.


















            Your Answer






            StackExchange.ifUsing("editor", function () {
            StackExchange.using("externalEditor", function () {
            StackExchange.using("snippets", function () {
            StackExchange.snippets.init();
            });
            });
            }, "code-snippets");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "1"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53956236%2fvisual-studio-code-automatic-commit-git%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            3















            I also wonder if using git in this way is a good option




            No, that would pollute the history of your commits.



            Using the extension "Local history" is a better approach, and does not rely on your VCS.

            (and is open-source: github.com/zabel-xyz/local-history)




            Every time you modify a file, a copy of the old contents is kept in the local history.

            At any time, you can compare a file with any older version from the history.

            It can help you out when you change or delete a file by accident.

            The history can also help you out when your workspace has a catastrophic problem.







            share|improve this answer





















            • Thanks a lot for this, it's a better option! Only thing is that Local History only save the file when I save it, not when I make an edit in VScode. I have seen the .saveDelay but it only works on save
              – MagTun
              Dec 28 '18 at 10:15






            • 1




              @MagTun Yes, that is why you need to activate gile auto.save: code.visualstudio.com/docs/editor/codebasics#_save-auto-save. That way, you won't even have to type CTRL+S
              – VonC
              Dec 28 '18 at 16:09
















            3















            I also wonder if using git in this way is a good option




            No, that would pollute the history of your commits.



            Using the extension "Local history" is a better approach, and does not rely on your VCS.

            (and is open-source: github.com/zabel-xyz/local-history)




            Every time you modify a file, a copy of the old contents is kept in the local history.

            At any time, you can compare a file with any older version from the history.

            It can help you out when you change or delete a file by accident.

            The history can also help you out when your workspace has a catastrophic problem.







            share|improve this answer





















            • Thanks a lot for this, it's a better option! Only thing is that Local History only save the file when I save it, not when I make an edit in VScode. I have seen the .saveDelay but it only works on save
              – MagTun
              Dec 28 '18 at 10:15






            • 1




              @MagTun Yes, that is why you need to activate gile auto.save: code.visualstudio.com/docs/editor/codebasics#_save-auto-save. That way, you won't even have to type CTRL+S
              – VonC
              Dec 28 '18 at 16:09














            3












            3








            3







            I also wonder if using git in this way is a good option




            No, that would pollute the history of your commits.



            Using the extension "Local history" is a better approach, and does not rely on your VCS.

            (and is open-source: github.com/zabel-xyz/local-history)




            Every time you modify a file, a copy of the old contents is kept in the local history.

            At any time, you can compare a file with any older version from the history.

            It can help you out when you change or delete a file by accident.

            The history can also help you out when your workspace has a catastrophic problem.







            share|improve this answer













            I also wonder if using git in this way is a good option




            No, that would pollute the history of your commits.



            Using the extension "Local history" is a better approach, and does not rely on your VCS.

            (and is open-source: github.com/zabel-xyz/local-history)




            Every time you modify a file, a copy of the old contents is kept in the local history.

            At any time, you can compare a file with any older version from the history.

            It can help you out when you change or delete a file by accident.

            The history can also help you out when your workspace has a catastrophic problem.








            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Dec 28 '18 at 9:31









            VonCVonC

            832k29026223162




            832k29026223162












            • Thanks a lot for this, it's a better option! Only thing is that Local History only save the file when I save it, not when I make an edit in VScode. I have seen the .saveDelay but it only works on save
              – MagTun
              Dec 28 '18 at 10:15






            • 1




              @MagTun Yes, that is why you need to activate gile auto.save: code.visualstudio.com/docs/editor/codebasics#_save-auto-save. That way, you won't even have to type CTRL+S
              – VonC
              Dec 28 '18 at 16:09


















            • Thanks a lot for this, it's a better option! Only thing is that Local History only save the file when I save it, not when I make an edit in VScode. I have seen the .saveDelay but it only works on save
              – MagTun
              Dec 28 '18 at 10:15






            • 1




              @MagTun Yes, that is why you need to activate gile auto.save: code.visualstudio.com/docs/editor/codebasics#_save-auto-save. That way, you won't even have to type CTRL+S
              – VonC
              Dec 28 '18 at 16:09
















            Thanks a lot for this, it's a better option! Only thing is that Local History only save the file when I save it, not when I make an edit in VScode. I have seen the .saveDelay but it only works on save
            – MagTun
            Dec 28 '18 at 10:15




            Thanks a lot for this, it's a better option! Only thing is that Local History only save the file when I save it, not when I make an edit in VScode. I have seen the .saveDelay but it only works on save
            – MagTun
            Dec 28 '18 at 10:15




            1




            1




            @MagTun Yes, that is why you need to activate gile auto.save: code.visualstudio.com/docs/editor/codebasics#_save-auto-save. That way, you won't even have to type CTRL+S
            – VonC
            Dec 28 '18 at 16:09




            @MagTun Yes, that is why you need to activate gile auto.save: code.visualstudio.com/docs/editor/codebasics#_save-auto-save. That way, you won't even have to type CTRL+S
            – VonC
            Dec 28 '18 at 16:09













            0














            I am the developer of auto-git. It's not open-source yet, but will be in the future. It detects within a specified interval all changes and will push it to the predefined remote with a static Auto-Git commit. I am still working on it to improve the functionality of the extension.



            Note: The link of the extension in the OT does not work anymore because change of publisher. Please use auto-git instead. Thank you.






            share|improve this answer










            New contributor




            Ray is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
            Check out our Code of Conduct.























              0














              I am the developer of auto-git. It's not open-source yet, but will be in the future. It detects within a specified interval all changes and will push it to the predefined remote with a static Auto-Git commit. I am still working on it to improve the functionality of the extension.



              Note: The link of the extension in the OT does not work anymore because change of publisher. Please use auto-git instead. Thank you.






              share|improve this answer










              New contributor




              Ray is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
              Check out our Code of Conduct.





















                0












                0








                0






                I am the developer of auto-git. It's not open-source yet, but will be in the future. It detects within a specified interval all changes and will push it to the predefined remote with a static Auto-Git commit. I am still working on it to improve the functionality of the extension.



                Note: The link of the extension in the OT does not work anymore because change of publisher. Please use auto-git instead. Thank you.






                share|improve this answer










                New contributor




                Ray is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.









                I am the developer of auto-git. It's not open-source yet, but will be in the future. It detects within a specified interval all changes and will push it to the predefined remote with a static Auto-Git commit. I am still working on it to improve the functionality of the extension.



                Note: The link of the extension in the OT does not work anymore because change of publisher. Please use auto-git instead. Thank you.







                share|improve this answer










                New contributor




                Ray is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.









                share|improve this answer



                share|improve this answer








                edited Jan 3 at 14:43





















                New contributor




                Ray is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.









                answered Jan 3 at 11:26









                RayRay

                11




                11




                New contributor




                Ray is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.





                New contributor





                Ray is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.






                Ray is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.





                    Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                    Please pay close attention to the following guidance:


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53956236%2fvisual-studio-code-automatic-commit-git%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Monofisismo

                    Angular Downloading a file using contenturl with Basic Authentication

                    Olmecas