Set up an upgradeable repository structure for Web Apps based on templates

The other day I was trying to update a boilerplate template we use on my work and came across an interesting strategy for applying updates they release. Taking into consideration that you write your own code on these templates, updating can be quite a lot of effort, especially from a major version to another. They had written a document where they explain how to do some git magic trickery and thought that since it is not actually something specific to them, I thought that I could try and use it on any other project. I chose this website for that, given I am using a Jekyll template named Chirpy and from time to time they release some nice updates, I thought it would be very useful to apply this strategy.

On this web page project I did set it up from the start and it works perfectly, the only manual work that you have to do is to resolve conflicts on files if there is any, of course this varies depending on the size of the project, the amount of changes both from the template and the ones that you made, etc.

Setting up a new project

That's all. Your develop branch will have a new template version. After testing the changes thoroughly you can merge your develop branch (or release branch if you are using Gitflow) to main to release the changes to production.

The important thing here is, you must not make any changes in original-template branch other than overwriting it with the latest version of the template.

← Previous
Create login and user with roles in Microsoft SQL Server
Home Next →
Remove branch name from Azure DevOps build pipeline for SonarQube Community Edition