如何设置matlab的Git源代码控制? [英] How to set up Git source control for matlab?

查看:323
本文介绍了如何设置matlab的Git源代码控制?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我第一次使用Github。我想将它用作共享代码和组织不同版本的代码的工具。

我已经下载了



编辑:

解决方案

您需要设置首先用matlab Git



涉及:


  • 解压缩 latest git archive (如 PortableGit-2.7.0-64-bit.7z.exe 未压缩在 c:\PortableGit-2.7.0-64位


  • add C:\PortableGit-2.7.0-64位; C:\PortableGit-2.7.0-64-bit\bin; C:\PortableGit-2.7.0-64-bit\ usr \bin 添加到您的%PATH%


  • 环境变量首页%HOMEDRIVE %% HOMEPATH%


  • 在CMD会话中启动matlab,其中 PATH 确实反映了上面提到的路径,并设置了 HOME




通常,创建一个小的senv.bat脚本(假设您按照指定安装了git):

  @echo off 
set PATH = C:\ windows \ system32; C:\ windows; C: \windows\System32\Wbem; C:\windows\System32\WindowsPowerShell\v1.0\

set GIT_ROOT = c:\PortableGit-2.7.0-64位
set PATH =%PATH%;%GIT_ROOT%;%GIT_ROOT%\cmd;%GIT_ROOT%\ bin;%GIT_ROOT%\usr\bin

setMATLAB_ROOT = C :\ Program Files \MATLAB\R2013b
set PATH =%PATH%;%MATLAB_ROOT%;%MATLAB_ROOT%\bin;%MATLAB_ROOT%\runtime\win64;%MATLAB_ROOT%\polyspace \bin;

打开CMD会话,进入放置 senv.bat的文件夹,键入 senv.bat ,然后从同一命令行启动MATLAB(我不知道MATLAB exe的名称)


This is the first time I'm using Github. I want to use it as a tool for sharing code and organizing the different versions of my code.
I've downloaded Git for Windows and installed. I've also installed Github Desktop as the GUI client. I'm studying ProGit book and GitHub Desktop Documentation to start.
Recently I'm coding with MATLAB for my thesis. So as the first step, I've started with Select or Disable Source Control System. But when I go to MATLAB > General > Source Control, there's only one option and that is none.

What should I do?


Edit:

解决方案

You would need to setup Git first with matlab.

That involves:

  • uncompressing the latest git archive anywhere you want (like PortableGit-2.7.0-64-bit.7z.exe uncompressed in c:\PortableGit-2.7.0-64-bit.

  • add c:\PortableGit-2.7.0-64-bit;c:\PortableGit-2.7.0-64-bit\bin;c:\PortableGit-2.7.0-64-bit\usr\bin to your %PATH%.

  • define the environment variable HOME to %HOMEDRIVE%%HOMEPATH%

  • launch matlab in a CMD session where PATH does reflect the paths mentioned above, and where HOME is set.

Typically, create a small senv.bat script with (assuming you did install git as I specified):

@echo off
set PATH=C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\

set GIT_ROOT=c:\PortableGit-2.7.0-64-bit
set PATH=%PATH%;%GIT_ROOT%;%GIT_ROOT%\cmd;%GIT_ROOT%\bin;%GIT_ROOT%\usr\bin"

set "MATLAB_ROOT=C:\Program Files\MATLAB\R2013b"
set PATH=%PATH%;%MATLAB_ROOT%;%MATLAB_ROOT%\bin;%MATLAB_ROOT%\runtime\win64;%MATLAB_ROOT%\polyspace\bin;

Open a CMD session, go to the folder where you put senv.bat, type senv.bat, then launch MATLAB from the same command line (I don't know the name of the MATLAB exe)

这篇关于如何设置matlab的Git源代码控制?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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