Skip to content

Instantly share code, notes, and snippets.

@HereChen
Forked from romanz/gist:968198
Last active August 29, 2015 14:00
Show Gist options
  • Save HereChen/11254286 to your computer and use it in GitHub Desktop.
Save HereChen/11254286 to your computer and use it in GitHub Desktop.
matlab: git
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