MATLAB command-line git for Mac?
3 次查看(过去 30 天)
显示 更早的评论
As of 2014b, MATLAB has native support for git. On a Mac, this seems to only be available via the "Current Folder" GUI.
Is there a way use use MATLAB command-line instead?
Also, is there a way (GUI or otherwise) to do "git status", seeing the status of the repo?
0 个评论
回答(1 个)
Bruno Pop-Stefanov
2014-10-20
编辑:Bruno Pop-Stefanov
2014-10-20
MATLAB R2014b does support git, but you still have to install it on your system in order to use it with MATLAB. Unfortunately, the command-line features are limited to checkin and checkout. If you want to do git status, for example, you would have to write a simple wrapper that passes the commands to the system, using the system command.
There is one already available on File Exchange:
This should let you use all the functionality that git provides at the command line, instead of using the Current Folder browser.
For detailed info about the integration of git in MATLAB, there are tutorials and links to functions at the following link:
For example, you can refresh the status of files by right-clicking in the Current Folder browser and clicking Source Control > Refresh Git Status.
2 个评论
Bruno Pop-Stefanov
2014-10-20
I thought checkin and checkout could be used with Git, but they apparently only work with non-MathWorks source control system. In the Preferences, if you select another source control system under the second radio button (below Enable MathWorks source control integration), then checkin and checkout won't throw an error.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Source Control 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!