Package a local Git Repository in a Toolbox

4 次查看(过去 30 天)
I want to package a local Git repository in my computer as a Matlab Toolbox.
I only want to package the Matlab functions, not the repository files (like the .git folder).
I ignore the git files in the repository folder using the "Package a Toolbox"-GUI.
The Toolbox Files and Folders section of the GUI shows me that I correctly ignored the Git files.
But when I package the Toolbox and install it in Matlab, the Toolbox folder contains the .git folder.
Even though that .git folder is empty, how do I effectively ignore it when packaging the toolbox?
Best regards,
Rodrigo
Edit: I am using MATLAB 2015b
  1 个评论
Adanay Martín
Adanay Martín 2016-9-5
I have the same problem. The answer below does not work or I'm missing something here. Did you solve the problem?
Best Regards,

请先登录,再进行评论。

采纳的回答

Sudhanshu Bhatt
Sudhanshu Bhatt 2015-11-9
Hi Rodrigo,
I understand that you want to remove the .git folder and any files contained inside it, when you package the functions into a toolbox.
I was able to follow the procedure you mentioned and achieve this.
Steps to package a toolbox and remove the .git folder:
Step 1) Navigate to the folder that needs to be packaged as a toolbox.
Step 2) Inside MATLAB, in the Environment section of the Home tab, select Package Toolbox from the Add-Ons menu.
Step 3) Choose the folder where the files to be packaged into a Toolbox are present.
Step 4) In the Package toolbox GUI, there is a section "Toolbox Files and Folders" section, in that section please click on the "Exclude Files and Folders". This will open up a small dialog box.
Step 5) Add "**/.git" to this dialog box. In my case, this looks like:
% All files of a certain name in all subfolders of the toolbox folder:
**/.svn
**/.git
Please note, that there is no "%" sign in front of "**/.git", otherwise it will be read as a comment. This will remove the .git folder and any files inside it from the packaged toolbox.
Step 6) Package and Install the Toolbox.
Step 7) Once, installed, navigate to the directory where the toolbox is present and it will have all the files you added except the GIT folder.
More information on how to Package a Toolbox can be found in the documentation page below:
Hope this helps.
If this still does not resolve your issue, you can create a Technical Support Request by clicking on the link below:
Thanks
Sudhanshu Bhatt

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Source Control 的更多信息

标签

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by