1

You've inherited a Prod/live Sitecore site. The previous team's source control is wildly out of date and full of random junk. They were directly making code changes (for example .cshtml) to the Prod/live site's inetpub/MySCSite/Website/ folder and not tracking in source (yes, barf).

How do you get source control setup for this site now? So that you can safely make changes in source and then deploy to the site.

I assume you would first find a way to separate base-install Sitecore files from the custom dev changes, correct? I.e. don't just grab the entire Website/ folder and put in source, correct?


1

Yes, you should not source control entire /website folder.

I assume that team had made changes to files like cshtml, config, css etc and in that case you will need to compare vanilla version of Sitecore with your website folder and copy new files you find in website folder to source control straight away. There are so many tools available to do this but I personally prefer beyond compare software. It’s a paid software but it has trial version too.

If you find configuration files updated directly then create patch files for them and store it in source control also make sure you update those config files to their original state in website folder and publish patch files to website.

  • Hi Mathew, thanks for the response. Would you suggest this approach?: after comparing vanilla to this site... definitely put in source control any website file that is new or modified compared to vanilla. And this would apply to .cshtml, .css, bin/.dll, everything correct? Please verify that's all correct... but then why NOT .config files that are modified? – Don Cheadle Oct 2 at 22:09
  • 1
    Yes, it would apply to files like cshtml, css, XML etc but If you find differences in dll files then it would require extra effort. If updated dlls are not obfuscated then use tools like dotpeek to extract code and update respective project’s code. If dlls are obfuscated then you won’t be able to extract code for that dll and in this case you have only one option left which is, contact previous team and get source code for that dll. Regarding modified config files, you should not put it in source control because it will create problems during Sitecore version upgrade. – Mathew Oct 2 at 22:23
  • @DonCheadle please accept the answer if it answers your question. Thank you! – Mathew Oct 2 at 23:36
  • Mathew, is it safe to say, with regards to comparing vanilla to the live site, that anything that MATCHES i.e. is in the vanilla instance and is the exact same in the site... these things MUST NOT be put into source control, correct? Since it's something from the vanilla install out-of-the-box. – Don Cheadle Oct 3 at 3:11
  • Yes, that’s right. – Mathew Oct 3 at 14:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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