Namespaces

Variants
Actions
Personal tools

Git For MATLAB

From UABgrid Documentation

(Difference between revisions)
Jump to: navigation, search
(Initial draft of Git for MATLAB page)
Line 5: Line 5:
 
To start out with, MATLAB's Git requires an empty folder. Currently this is just an empty folder with no source control (a regular MATLAB folder).
 
To start out with, MATLAB's Git requires an empty folder. Currently this is just an empty folder with no source control (a regular MATLAB folder).
  
[[File:MatlabOpenToEmptyFolder.png|500px|left|alt text]]  
+
[[File:MatlabOpenToEmptyFolder.png|450px|center|start out with a clean folder]]  
  
 
If you have no empty folder, create one, as MATLAB's Git will give an error if there are any files in the folder.
 
If you have no empty folder, create one, as MATLAB's Git will give an error if there are any files in the folder.
  
 
==Clone a Git Repository using MATLAB==
 
==Clone a Git Repository using MATLAB==
Right click in the file browser. Navigate to Source Control->Manage Files
+
Right click in the file browser to bring up the context menu. Navigate to and select Source Control->Manage Files
[[File:MatlabSourceControlManageFiles.png|500px|left|alt text]]
+
 
 +
[[File:MatlabSourceControlManageFiles.png|450px|center|initializing source control]]
 +
 
 +
The "Manage Files using Source Control" interface will pop up. Select ""Git"" for your ""Source Control Integration"" option.
 +
Under ""Repository Path"" you place the URL of the repository you are going to clone into your empty directory. ""Sandbox"" should be filled in with the current directory. Ideally this is the directory in which you wish to place the cloned repository.
 +
 
 +
[[File: MatlabCloneRepositoryContextMenu.png|450px|center|initializing source control]]
 +
 
 +
In this screenshot a sample GitLab Repository URL is pasted into the ""Repository Path"" text box. If you click "Change" on the same line, an additional window will appear where you can also validate the link prior to attempting to clone the repository.
 +
 
 +
Once this dialog has been filled in appropriately, clicking the "Retrieve" button will initialize the repository and checkout the current revision into the selected folder

Revision as of 14:52, 11 July 2018

MATLAB on Cheaha has been configured to work with Git.

Option 1: Cloning a Git Repository into MATLAB

Create a clean folder to use with Git

To start out with, MATLAB's Git requires an empty folder. Currently this is just an empty folder with no source control (a regular MATLAB folder).

Error creating thumbnail: convert: unable to open image `/research/apps/rnb/docs/htdocs/tgw/images/c/c9/MatlabOpenToEmptyFolder.png': No such file or directory @ error/blob.c/OpenBlob/2589.
convert: unable to open file `/research/apps/rnb/docs/htdocs/tgw/images/c/c9/MatlabOpenToEmptyFolder.png' @ error/png.c/ReadPNGImage/3639.
convert: missing an image filename `/tmp/transform_528e10b-1.png' @ error/convert.c/ConvertImageCommand/3015.

If you have no empty folder, create one, as MATLAB's Git will give an error if there are any files in the folder.

Clone a Git Repository using MATLAB

Right click in the file browser to bring up the context menu. Navigate to and select Source Control->Manage Files

Error creating thumbnail: convert: unable to open image `/research/apps/rnb/docs/htdocs/tgw/images/0/01/MatlabSourceControlManageFiles.png': No such file or directory @ error/blob.c/OpenBlob/2589.
convert: unable to open file `/research/apps/rnb/docs/htdocs/tgw/images/0/01/MatlabSourceControlManageFiles.png' @ error/png.c/ReadPNGImage/3639.
convert: missing an image filename `/tmp/transform_498d160-1.png' @ error/convert.c/ConvertImageCommand/3015.

The "Manage Files using Source Control" interface will pop up. Select ""Git"" for your ""Source Control Integration"" option. Under ""Repository Path"" you place the URL of the repository you are going to clone into your empty directory. ""Sandbox"" should be filled in with the current directory. Ideally this is the directory in which you wish to place the cloned repository.

Error creating thumbnail: convert: unable to open image `/research/apps/rnb/docs/htdocs/tgw/images/2/22/MatlabCloneRepositoryContextMenu.png': No such file or directory @ error/blob.c/OpenBlob/2589.
convert: unable to open file `/research/apps/rnb/docs/htdocs/tgw/images/2/22/MatlabCloneRepositoryContextMenu.png' @ error/png.c/ReadPNGImage/3639.
convert: missing an image filename `/tmp/transform_3fc73d-1.png' @ error/convert.c/ConvertImageCommand/3015.

In this screenshot a sample GitLab Repository URL is pasted into the ""Repository Path"" text box. If you click "Change" on the same line, an additional window will appear where you can also validate the link prior to attempting to clone the repository.

Once this dialog has been filled in appropriately, clicking the "Retrieve" button will initialize the repository and checkout the current revision into the selected folder