1

I am having the code base in my SharePoint(classic SharePoint site) library. This library having the JS,HTML,ASPX and other files and folders.(around 1000 files)

I have created one repository in Github and How I can move this code to the repository.(Example Github url: github.xx.net).

After moving the code to repository if we make any changes how this will reflect in the SharePoint library ?

How I can achieve this using Visual studio professional 2022 ?

6
  • you have a client side solution with a thousand files? Commented Jan 17, 2023 at 23:26
  • are you envisioning a 2-way sync or just push from github? Are you anticipating pushing this code to multiple sites/environments or just one site? Is this a classic or modern site? Are the thousand files all necessary or just the entire contents of a document library? Commented Jan 17, 2023 at 23:37
  • give a little more detail of what you're trying to do. I feel like if I spend time writing an answer it won't be useful because of some detail you've left out. Commented Jan 17, 2023 at 23:38
  • Currently we are opening the Library on OneDrive folder and making the changes in the files. So it immediately reflecting to SharePoint.
    – Elina
    Commented Jan 18, 2023 at 7:19
  • So my question is , Once we push the code to Github repo and if we want to make any changes in the existing file how it will reflect in SharePoint ? without using OneDrive.
    – Elina
    Commented Jan 18, 2023 at 7:21

1 Answer 1

0

SharePoint libraries aren't designed to be used as code repositories. I would recommend only using services designed for storing code, such as Azure DevOps or GitHub.

6
  • that's exactly why she's asking the question Commented Jan 17, 2023 at 18:19
  • You just download the files and upload them to GitHub, it isn't hard. The last part of her question states how it would affect the library, insinuating a synchronisation between the two which isn't possible. Commented Jan 17, 2023 at 23:13
  • Or why would you do this over releasing your code via SPFx/sppkg files? Commented Jan 17, 2023 at 23:20
  • The OP is a little light with the details. SPFX would be preferred but if they have an old classic site with 1000 files then re-architecting would probably be a non-starter. A Github action running PnP Powershell or o365 CLI could totally do the syncing though. Commented Jan 17, 2023 at 23:26
  • 1
    a mission critical legacy system and no one knows how it works... happens all the time Commented Jan 17, 2023 at 23:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.