问题描述
很多时候,我忘记将编辑提交到我的git中.而且,如果我关闭了VSCode,我将无法再使用ctrl-Z.因为我已经设置了git,所以我认为我可以每30秒左右使用一次自动提交等功能.
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.
我见过扩展名 btu ti不是开源的,所以我不想使用它.我还发现了这,但是我的编程技能不足以实现它.
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.
我还想知道以这种方式使用git是否是个好选择,因为git文件夹可能很快变得很重(我的git只是本地的,所以我可以处理几个gigab)
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?
推荐答案
否,那会污染您提交的历史记录.
No, that would pollute the history of your commits.
使用扩展名"本地历史"是一种更好的方法,并且不依赖您的VCS.
(并且是开源的: github.com/zabel-xyz/local-history )
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)
这篇关于Visual Studio代码:自动提交git的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!