连续版本控制 [英] Continuous version control

查看:112
本文介绍了连续版本控制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我没有看到一个连续的版本控制系统 - 一个将保存在您开发它们的代码更改,而不是等待正式签入。更改将保存为未签到当然,但他们会被保存下来备份,并在您实际进行正式签入之前由其他人查看。



我没有看到这个,并想知道是否,



现在程序员认为源代码控制是集成代码包,但是,

解决方案

blockquote>

现在程序员认为源代码控制是集成代码包,但为什么不让这些包变小并连续集成?


我想说DVCS已经基本上这样做了,不是因为他们是分散的,但因为提交是这么快更快。用git我承诺远远多于SVN ..它也使它简单提交chunks或特定的代码(使用 git add -i git gui ),更多关注跟踪代码行,而不是完整的文件(像传统的VCS像Subversion)



另外,git固有的工作方式, 更改将保存为未签入当然..当您提交,更改是本地的,然后你推送他们到远程机器用一个单独的命令..你可以提交每次你保存,然后rebase



对于一个执行连续版本控制的工具,你可以使用shell脚本来完成这个任务。 。

  while [1]; do 
git add -a&&& git commit -mAutocommit at $(date);
sleep 10;
done

有一个脚本 CACM github ),它执行类似的操作


[CACM]



只要使用:



cacm --repo dir_of_git_repo --watch dir_to_watch


我不知道为什么我想要这样做。我发现使用VCS的最有用的事情之一是我改变了(从最后一次提交)的差异。



此外,e文本编辑器有一个有趣的功能,它通过分支可视化撤销历史记录。有一个博客上的与截图。


I haven't seen a continuous version control system - one that would save changes in your code as you developed them, rather than waiting for an official check in. The changes would be saved as 'not checked in' of course, but they would be saved away for backup, and viewing by others before you actually did the official check in.

I haven't seen this, and wonder if it, or something like it, exists, and the reasons why it might or might not be a good idea.

Right now programmers think of source code control as integrating packets of code, but why not make those packets smaller and integrate continuously?

-Adam

解决方案

Right now programmers think of source code control as integrating packets of code, but why not make those packets smaller and integrate continuously?

I would say DVCS are already basically doing this now, not because they are decentralised, but because commiting is so much quicker.. With git I commit far more often than with SVN.. It also makes it simple to commit "chunks" or specific of code (using git add -i or git gui), and is generally much more focused on tracking lines of code, rather than complete files (as "traditional" VCS' like Subversion)

Also, the way git inherently works means, as you said, "the changes would be saved as 'not checked in' of course".. When you commit, the changes are local, then you push them to the remote machine with a separate command.. You could commit every time you save, then rebase them into a single commit if you wished.

As for a tool that does "continuous version control", you could do this quite simply with a shell script, something like..

while [ 1 ]; do
   git add -a && git commit -m "Autocommit at $(date)";
   sleep 10;
done

There is a script, CACM (github), which does something similar

[CACM] watches a specific directory, and commits all the changes to a standalone Git repository.

To use just do:

cacm --repo dir_of_git_repo --watch dir_to_watch

I'm not sure why you'd want to do so.. I find one of the most useful things about using a VCS is the diff of what I've changed (since the last commit). It seems like having constant/automated commits would just be noise..

Also, the "e" Text Editor has an interesting feature, it visualises the undo history, with branching. There is a blog-post on it with screenshots.

这篇关于连续版本控制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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