Git repository in OneDrive synced folder

后端 未结 7 2000
南笙
南笙 2021-02-07 02:48

I am trying to create a git repository located within a OneDrive synced folder, but I am running into an issue.

I use OneDrive to sync folders between my multiple device

7条回答
  •  日久生厌
    2021-02-07 03:14

    I'm not answering the question as I believe there is not a straight forward answer. But the use case is compelling. Let's assume I like to keep all the projects I'm working on in a projects folder within the OneDrive synced folder with all the Office magic as added value. Lets assume it is a web project. I'd have

    OneDrive/Projects/
        Project A/
        Project B/
          Documentation/
            UserManuals/
          Backups/
            2020-09-16/
          SQL-queries/
          htdocs
             .git
             .gitignore
             assets/css
             index.php
          Research/
    

    Of the folders in Projekt B I'd like to sync all but htdocs (and perhaps the Backup) folder as it already is under some sort of version control (git) with a Git server (BitBucket). For me this is a very common thing and I have yet to come up with a satisfying solution. Of course I could move out the htdocs folder (and Backup) to somewhere outside the OneDrive tree, but that would make the layout brittle and finalizing and archiving the project would not be straight forward. One solution I could think of would be to move Projects outside OneDrive, add the stuff to be synced in a separate folder and add this folder as a symlink inside the OneDrive folder struct.

提交回复
热议问题