Sean Holmesby

.NET and Sitecore Developer

By

Change to the source control strategy on Habitat TDS

The HabitatTDS fork of the original Habitat codebase has been around for a while, but with the recent updates, I’ve decided to change the strategy that was in place (in case anyone was wondering where to grab the code from).

Previously, the master branch on HabitatTDS was kept exactly in sync with the original repo’s master branch.
This was done by setting an upstream branch pointing back to the original repo, and merging each update across to the HabitatTDS master branch.
By looking at the master branches in each, anyone could tell how up-to-date the TDS repo was when compared to the original (and was great for me to know if/when I needed to do another merge across).

Then there was the TDS-latest branch, in which the master branch was merged into, and the removal-of-Unicorn/introduction-of-TDS was performed.
Typically this was fairly easy, with only some new .yml files to be deleted, and the matching .item files being created and pushed.

Therefore, the TDS-latest branch represented the same snapshot of Habitat, in TDS form, at the point at which the master branch had been updated.

The problem with this was that the default branch for any repo is the master branch….so often we would have people come to the repo page, clone it (bringing down the master branch) and not know what to do as they couldn’t see TDS anywhere.

But now

To combat the issue of people mistaking the master branch for where TDS exists, I’ve flipped the process around.

A new branch has been created called original-repo.
This represents what master used to be….a snapshot of the original repo’s master branch, at the time it was last merged across.

And now the master branch is what the old TDS-latest branch used to represent…. that same snapshot in original-repo, but in TDS form.

Now this will make it easier for people to find the TDS branch of Habitat, allowing them to work with the many features that come with TDS that can’t be found elsewhere.

Leave a Reply

Your email address will not be published. Required fields are marked *