Skip to main content

SitecoreAI · Tutorial

Sitecore Serialisation (SCS) for Front-End Developers

The SCS commands for moving Sitecore items in and out of source control, in the order you’ll actually use them.

gavAusWeb1 min read

Goal: get comfortable moving Sitecore items in and out of source control from the command line. If you're used to git-only workflows, SCS is the missing piece that makes Sitecore content items behave like versioned code.

The serialisation workflowLink to this section

  1. Step 1: Log in

    Authenticate against your Sitecore instance from your project's PowerShell terminal:

    ps1
    dotnet sitecore login --authority https://id.yoursite.localhost/ --cm https://cm.yoursite.localhost --allow-write true
  2. Step 2: Pull items

    Pull existing Sitecore items into your local repo so you have a baseline to work against:

    ps1
    dotnet sitecore ser pull
  3. Step 3: Push your changes

    When you've made template or content structure changes in Sitecore and need them committed to git, push your local serialized items back up:

    ps1
    dotnet sitecore ser push
  4. Step 4: Validate before committing

    Check your serialization config is sound before you commit. Add --fix to auto-resolve common issues:

    ps1
    dotnet sitecore ser validate
    dotnet sitecore ser validate --fix

Stay in sync while you workLink to this section

While actively working, run dotnet sitecore ser watch to auto-sync item changes as you make them in Sitecore, so you don't forget to pull before ending your session.

ps1
dotnet sitecore ser watch

It's also worth running the content tree's 'Broken Links' check (right-click context menu) after a pull/push cycle, to catch anything serialization missed.