Package a local Git Repository in a Toolbox

조회 수: 13 (최근 30일)
Rodrigo
Rodrigo 2015년 11월 5일
댓글: Adanay Martín 2016년 9월 5일
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 Integration에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by