Advent of SysML v2 | Lesson 6 – Version Control with Git

Hello and welcome back to the Advent of SysML v2 – a daily, hands-on mini-course designed to bring you up to speed with the new SysML v2 standard and the modern Syside tooling that makes you productive from day one.

By the end of this lesson, you will:

  • Discover Git and why it matters for SysML v2
  • Learn how to commit model changes
  • See Git diff in action

Git + SysML v2

If you’ve worked with SysML v1, you know that models are tightly coupled to the tool you’re using. Most tools store models in proprietary formats that aren’t meant to be read or edited by hand. Even when you can see the underlying files, they’re often machine-generated representations that don’t work well with version control.

Here’s what SysML v1 tool storage looks like:

The machine-generated format is dense and unreadable – even simple model elements are buried in complex markup. This makes version control nearly impossible to use effectively.

SysML v2 changes this fundamentally. Your models are stored as human-readable text files – the same `.sysml` files you’ve been editing throughout this course:

The difference is stark. SysML v2’s text-based format is clean and human-readable, making your models accessible whether you’re using a graphical tool or reviewing the text directly. You can still use graphical tools and diagrams, but underneath, the text-based format means Git can track your work meaningfully. This means you can see exactly what changed, collaborate without conflicts, and never lose work.

Your first Git workflow

Now that you understand why Git and SysML v2 work so well together, let’s see how easy it is to get started. If Git sounds intimidating, don’t worry. You won’t touch the command line or write code. Your modeling environment’s built-in Source Control makes it as simple as a few clicks.

Here’s the basic workflow:

1. Initialize your repository (single click in the Source Control panel)

2. Stage and commit your changes (a commit is a snapshot of your work – write a message, click commit)

3. Review diffs whenever you make changes (see what changed side-by-side, automatically)

Git is now tracking your work, and you can see exactly what changed, when, and why. No command line required.

Exploring Git history

Once you’ve made a few commits, you’ll want to see your work history. VS Code gives you two powerful views for this: Timeline and Git Graph.

Timeline view

Timeline view shows you a chronological list of commits for the current file, perfect for quickly seeing “when did I last change this?”

Git graph

Git Graph shows the full branching structure of your repository, including parallel work and merges.

You don’t need to understand branching or merging yet. Just know that these tools let you explore your work history visually, compare any two points in time, and understand how your model evolved.

Takeaway:

  • SysML v2 files are text-based and designed to work with Git from day one.
  • VS Code’s Source Control makes Git accessible – no command line needed.
  • Timeline and Git Graph let you explore your work history visually.

Challenge for Tomorrow

Time to practice your new Git skills! Download one of the models from Syside Cloud (or create a simple `.sysml` file locally), then complete the following tasks in VS Code:

1. Initialize Git for your model folder using the Source Control panel.

2. Make your first commit with all your model files. Use a clear message like “Initial model structure.”

3. Make a change to your model (rename a part, add an attribute, anything). Stage and commit it.

4. Make another change and commit it. Now you have three commits.

5. Open the Timeline view at the bottom of Explorer and click on your first commit to see how the model has evolved.

The goal is to get comfortable with the basic workflow: change → stage → commit → review. These three steps will become second nature as you work with SysML v2.

Summary

In this lesson, you discovered why Git and SysML v2 are a natural fit. Unlike SysML v1’s tool-locked proprietary formats, SysML v2 stores your models as human-readable text that you can version control meaningfully. You learned how to use VS Code’s Source Control to initialize a repository, commit changes, and review diffs – all without touching the command line. And you explored Timeline and Git Graph views for visualizing your work history.

With Git in your toolkit, you can now experiment fearlessly, track every change, and collaborate with confidence. If you haven’t yet done the challenge, head over to Syside Cloud to practice your new Git skills – and don’t forget to come back tomorrow for another episode of the Advent of SysML v2!

Cookies