Projects, Git, and OneDrive Repository Corruption.

34 Ansichten (letzte 30 Tage)
Strider
Strider am 5 Dez. 2023
Beantwortet: Pratyush Swain am 13 Dez. 2023
While cloning a repository to my OneDrive a prompt appeared in the folder location with the following: "Concurrent access to OneDrive synced folders might corrupt repositories".
I have experienced significant frustration with projects, git, and git submodules in MATLAB, but I have been unsure if it is from my own novice abilities. I would prefer to work on OneDrive at the push of my company.
Most generally I am asking:
  • Can some clarification on that statement be given?
  • Are there do's and don't's with workong on OneDrive / git?
  • Does anyone have success or failure working with git on OneDrive in MATLAB projects?
  • Is it worth learning git CLI? i.e. Does anyone use the git CLI in MATLAB opposed to the projects GUI with more or less succes?
Additional:
I have experienced this in the old and newer MATLAB desktops.
  1 Kommentar
Walter Roberson
Walter Roberson am 5 Dez. 2023
Sadly, OneDrive appears to not be robust, especially when in-place changes are made to a file. It is not uncommon for people to need to create files on a local device and copy them to OneDrive. The problems do not appear to be matlab specific (though sometimes matlab is able to program around the problems)

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Pratyush Swain
Pratyush Swain am 13 Dez. 2023
Hi Wesley,
I understand you are facing problems in cloning repository to OneDrive.The warning prompt appeared due to the risk of concurrent access of repositories within the OneDrive synced folders. It is generally recommended to avoid placing Git repositories directly within OneDrive synced folders due to these potential conflicts. Instead, its better to keep your Git repositories in a dedicated local directory outside of the OneDrive sync folder.
Before using Git with MATLAB projects, please follow the steps in https://www.mathworks.com/help/matlab/matlab_prog/set-up-git-source-control.html to setup your system and avoid file corruption.
After setup, please carefully follow the workflow instructions as per https://www.mathworks.com/help/matlab/matlab_prog/use-git-in-matlab.html.
Alternatively you can also resort to manage git from the commandline too which might be more transparent process. For example for cloning a repository , you can use the following command on terminal.
git clone <repo> <target dir>
The target directory can be opened after the execution of the command to view the cloned files.
For more information on Git commands,please refer to https://git-scm.com/docs/git.
Hope this helps.

Weitere Antworten (0)

Kategorien

Mehr zu Source Control Integration finden Sie in Help Center und File Exchange

Tags

Produkte


Version

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by