Projects, Git, and OneDrive Repository Corruption.
30 ビュー (過去 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
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
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.
Hope this helps.
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Source Control についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!