Projects, Git, and OneDrive Repository Corruption.

29 次查看(过去 30 天)
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 个评论
Walter Roberson
Walter Roberson 2023-12-5
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)

请先登录,再进行评论。

采纳的回答

Pratyush Swain
Pratyush Swain 2023-12-13
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.

更多回答(0 个)

类别

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

标签

产品


版本

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by