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
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!