Problem in creating a new local Git repository
13 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello,
I've just discovered that Matlab 2020b implements a built-in git integration. I tried to create a new repository without success.
As far as I know, when you use the command git init in "A" folder, git will create an hidden .git folder in "A" where all snapshots are stored. So, I opened my project folder in Matlab, right clicked in current empty folder and then clicked on source control -> manage files. When the dialog box opens, I selected:
- "A\.git" as Repository path
- "A" as Sandbox
But I received this errore message: "Destination path "A" already exists and is not an empty directory".
I also tried others configurations:
- "A" as Repository path
- "A" as Sandbox
I'm able to finish the procedure if and only if I choose two not related folders, ie. "B" and "A". In this case, however, I'll find git files both in "B" and in "A\.git" folder which is automatically created.
How could obtain the typical git behaviour?
Thanks
5 Kommentare
Mario Malic
am 26 Okt. 2020
Bearbeitet: Mario Malic
am 26 Okt. 2020
Example: Go to folder with all the files, New - Project - From Folder. After you selected it, from the toolbar click on Source Control, and then select Git and OK. Now you'll have the Source Control Toolbar to do whatever needed.
Hidden folders .git, resources, and .prj file, are not part of project by default.
What is the difference between !git init (MATLAB CMD window) and git init (shell/CMD)?
Edit: Just verified, you can have more projects within folders, but can't have two projects in the same folder.
Antworten (0)
Siehe auch
Kategorien
Mehr zu Source Control Integration finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!