Skip to main content

Tutorial: version a workflow with Git, and see what changed

.weave files are JSON, so Git can version them. Text diffs of graph JSON are hard to read, though, so EdgeWeave's Git panel shows a changed workflow as a graph, with added, removed and modified nodes coloured.

You need Git installed. You don't need a GitHub account unless you want to push.

1. Turn the project into a repository​

  1. Open the Code Editor screen and pick the Git tab in the right-hand panel.
  2. If the project isn't a repository yet, the panel says so. Click Initialize repository.

The panel then shows the current branch, Pull / Push buttons, and two lists: Staged Changes and Changes.

2. Make a first commit​

  1. Every file in the project appears under Changes. Click Stage on the files you want, for example your .weave workflows and modules/user_blocks/.
  2. Type a message in the Commit message box and click Commit.

Avoid committing large data files, databases, or .env. A .gitignore in the project folder keeps them out.

3. Change the workflow​

Go back to Graph Design, open the workflow, and change it: add a node, delete one, rewire a connection, or edit a field. Then Save.

4. See the graph diff​

  1. Back in the Git tab, the .weave file is listed under Changes.
  2. Click the file name. Instead of a wall of JSON, a read-only canvas opens with both versions merged:
    • Added nodes and connections in green,
    • Removed ones in red (dashed),
    • Modified nodes (changed fields) in orange, with a legend at the top.

A file under Changes is compared with what's staged. A file under Staged Changes is compared with the last commit. Other files (Python, JSON, Markdown) open in an ordinary side-by-side text diff.

5. Branches, push and pull​

  • The branch drop-down switches branches. + creates a new one.
  • Push and Pull sync with the repository's remote, if it has one. Credentials come from your normal Git setup, not from EdgeWeave.

The graph diff is a comparison view. It isn't a merge tool, so resolve merge conflicts in .weave files with your usual Git tools.

Next: Export a dashboard.