Source Control for packages in MatLab 2019a

I have started to look at how source control and projects are integrated into MatLab 2019a. I have existing code - which I want to organize into the new project structure supported by MatLab - and also put this under git version control at the same time (not Github).
Things seem to work most easily if you create an empty remote repository, then create a project folder that is associated with it using new Project -> from git, and then add the files to the sandbox, and go from there - other approaches seem to hit all sorts of problems.
It is not clear to be how to handle packages, for example - if I create a repository for a package like <my_packages>\+abc
the 'create project' step produces the error message: 'Folder name +abc starts with an illegal character' - if you click 'ok' - then there is a spinning cursor which does not stop.

댓글 수: 3

per isakson
per isakson 2019년 10월 18일
편집: per isakson 2019년 10월 18일
I started to use "project" together with git with local repository a few months ago on R2018b.
"other approaches seem to hit all sorts of problems" agree!
However, I have had no problems with packages.
Andrew J
Andrew J 2019년 10월 18일
Yes,
I have been trying this for most of the day.
My general impression is that the integration of git with the MatLab IDE is quite poor - the pieces have been put together (projects, source control, etc) without thinking about the overall workflow that you have to go through to do very simple things - that we need to do often and so without too much effort - and without encountering errors and obstacles at every step..
The current method that I use is to impose structure on the codebase - so it is organized into projects and packages (although not the Mathworks implementation) - and manage the source control using a set of scripts that exist in that envronment.
I have spent all day trying to get to grips with the combination of 'projects' in MatLab, and the way that git has been integrated into the ui - and I have not even got close to achieving what I can already do in a few minutes with the fairly simple scripts and structures that I already have in place.
So I wont be using these features - or recommending anyone else to use them either.
A
per isakson
per isakson 2019년 10월 19일
"without thinking about the overall workflow" IMO that's supported by the blog-post Best Practices – Adapt, then Adopt! and Toolbox Tools by STAFF. From scratch, I set up
  • a sandbox,
  • a local repository (not GitHub)
  • a project
  • an Add-Ons folder
according to these two resources. ("scratch" included an old codebase.) I finally succeded.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

도움말 센터File Exchange에서 Git in MATLAB에 대해 자세히 알아보기

제품

질문:

2019년 10월 18일

댓글:

2019년 10월 19일

Community Treasure Hunt

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

Start Hunting!

Translated by