有没有一种在编写代码时完全不可见的版本控制系统?
我想使用版本控制,但我不想每小时连续提交几次。是否有一个版本控制系统可以在您编程时记录所有内容,这样您就不必提交,但仍然可以让您返回到代码的先前状态?
I would like to use version control but I don't want to continuously commit several times an hour. Is there a version control system that records everything while you program so you don't have to commit, but still lets you go back to a previous state of your code?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
Dropbox 可以做到。它记录了您所做的每一个更改。
Dropbox can do it. It records every change that you make.
如果您使用 ZFS 文件系统,则可以执行类似的操作。
然而,从版本控制的角度来看,我真的不认为存储每个更改是一个好主意。您的存储库的大小将很快变得巨大。
仅供参考,您不必每小时提交几次,我每天很少提交超过 4-5 次。
You can do something like this if you're using the ZFS filesystem.
However, from a version-control point of view, I really don't think it's a good idea to store every changes. The size of you repository will become huge really fast.
And FYI, you don't have to commit several times an hour, I rarely do more than 4-5 commits a day.
某些操作系统可以非常轻松地将 WebDAV 共享安装到文件系统中;您可以配置 SVN 服务器来导出 WebDAV,将导出安装到您的文件系统中,然后开始工作。
不要忘记配置你的编辑器将临时文件或备份文件存储在源代码树或当前工作目录之外的其他位置。否则,您的源代码控制系统将会出现大量无用的文件,使其更难以使用。
但是,如果不检查将相关更改链接在一起的注释或更改集,找到要恢复到哪个版本可能会非常困难;如果很难用来撤消特定更改,则可能不值得花费精力配置整个系统。
Some operating systems make mounting WebDAV shares into the filesystem very easy; you could configure an SVN server to export WebDAV, mount the export into your filesystem, and get to work.
Don't forget to configure your editor to store temporary files or backup files somewhere other than your source tree or current working directory. Otherwise you'll have a ton of useless files cluttering up your source control system, making it harder to use in the future.
But finding which version to revert to can be pretty difficult without check in comments or changesets linking related changes together; it might not be worth the effort of configuring the entire system if it is too difficult to use to undo specific changes.