We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(4)
我建议 mercurial 使用 TortoiseHg 接口。有 64 位 Windows 版本可供下载。它包含一组 Windows shell 扩展,因此它可以在资源管理器窗口中很好地工作。
它易于设置和使用,并且多次拯救了我。 Mercurial 可以很好地处理二进制文件,因此 MATLAB mat 文件和 Fig 文件都可以放入版本控制中。我想说,如果您正在使用指南,这是必不可少的。在使用 Guide 开发 GUI 时,有时会出现 Guide 崩溃并且无法再次重新打开 Fig 文件的情况。幸运的是,Mercurial 快速回滚到上一个工作版本,我又重新开始工作了。
说实话,我从来没有真正对 MATLAB 与 SCM 的集成印象深刻,它似乎只是一个附加选项,而不是集成。 NetBeans 之类的东西展示了如何将 SCM 集成到开发环境中。因此,我不会尝试让 MATLAB“使用”SCM,而只是将 Mercurial(或您选择的任何内容)与 MATLAB 一起使用。
哦,它也是免费的。
I'd recommend mercurial using the TortoiseHg interface. There is a 64bit windows version available for download. It includes a set of windows shell extentions so it works nicely from the explorer window.
It's easy to set up and use and it's saved me on numerous occasions. Mercurial works well with binary files so MATLAB mat files and fig files can all be placed in version control. I'd say it's essential i you're using guide. In developing GUI's with guide there have been occasions where guide has crashed and was unable to reopen the fig file again. Fortunately a quick roll back in Mercurial to the last previous working version and I was back working again.
To be honest I've never really been that impressed with MATLAB's integration with SCM, it just seems to be a tacked on option rather than integrated. Something like NetBeans shows how you can integrate SCM in the development environment. So I wouldn't try to get MATLAB "to use" SCM rather just use Mercurial (or whatever you choose) alongside MATLAB.
Oh and it's free as well.
我一直在使用 git 来跟踪我的 matlab 代码,它非常有用。如果您确实走这条路,请创建一个 .gitignore 文件并将以下内容放入其中
第一个文件的原因是您不想存档自动生成的备份。由于 .mat 和 .fig 文件可能很大并且通常由您的代码生成,因此我也不存档它们。一个例外是无花果树。我创建一个 gui 目录并在其中放入一个新的 .gitignore 文件,
该文件告诉 git 不要忽略该目录中的 .fig 文件
I've been using git to track my matlab code and it's been very useful. If you do go this route, make a .gitignore file and put the following in it
The reason for the first one is that you don't want to archive your autogenerated backups. Since .mat and .fig files can be large and are generally generated by your code, I don't archive them either. One exception is gui figs; I create a gui directory and put a new .gitignore file in it with
which tells git not to ignore .fig files in that directory
对于 SVN,我编写了一个用于提交(并检查差异in) 代码,用于当我懒得启动另一个应用程序来提交我的更改时(或者当没有好的、免费的客户端,如 OS X 上)。
您可以对任何其他版本控制系统执行类似的操作,然后您无需担心 Matlab 是否支持它。
For SVN, I have written a Matlab-GUI for committing (and checking differences in) code for when I'm too lazy to launch another application to commit my changes (or for when there is no nice, free client, like on OS X).
You could do something similar for any other version control system, and then you don't need to worry about whether Matlab supports it.
您可能有兴趣使用 Subversion 或 Git,这是久经考验的通用 SCM。
You might be interested in using Subversion or Git, which are tried-and-true, general-purpose SCMs.