Skip to content

Instantly share code, notes, and snippets.

@romanz
Created May 12, 2011 08:55
Show Gist options
  • Save romanz/968198 to your computer and use it in GitHub Desktop.
Save romanz/968198 to your computer and use it in GitHub Desktop.
MATLAB Git wrapper (for Windows)
function [status, result] = git(varargin)
cmd = '"c:\Program Files\Git\cmd\git.cmd"';
for i = 1:numel(varargin)
cmd = [cmd ' ' varargin{i}];
end
switch nargout
case 0, system(cmd);
case 1, [status] = system(cmd);
case 2, [status, result] = system(cmd);
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment