Visual Studio代码:自动提交git [英] Visual studio code: automatic commit git

查看:730
本文介绍了Visual Studio代码:自动提交git的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

很多时候,我忘记将编辑提交到我的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?

推荐答案

我也想知道以这种方式使用git是否是个好选择

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

否,那会污染您提交的历史记录.

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)

每次修改文件时,旧内容的副本都会保留在本地历史记录中.
您可以随时将文件与历史记录中的任何旧版本进行比较.
当您意外更改或删除文件时,它可以为您提供帮助.
当工作区发生灾难性问题时,历史记录还可以为您提供帮助.

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.

这篇关于Visual Studio代码:自动提交git的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆