Projects, Git, and OneDrive Repository Corruption.
35 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Strider
le 5 Déc 2023
Réponse apportée : Pratyush Swain
le 13 Déc 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 commentaire
Walter Roberson
le 5 Déc 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)
Réponse acceptée
Pratyush Swain
le 13 Déc 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.
Hope this helps.
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Source Control Integration dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!