Git workflows in depth

How branches, pull requests, merges and imports fit together when you build in Alloy, in your editor, or both.

The model

BranchWho writes itPurpose
mainYou (and the first Alloy push)What is live. Deploys from here.
alloy/<topic>-v<n>AlloyOne branch per prompt or group of prompts, with an open pull request
Your branchesYouWork in your editor; merge into main as usual

Workflow A: Alloy only

  1. Prompt in the Studio. Alloy pushes a branch and opens a pull request.
  2. Review the preview deployment from your host.
  3. Click Merge into main in Manage Git. Your host deploys.

Workflow B: editor only

Clone the repository and work like any project. Alloy is not involved until you want it again.

Workflow C: both (recommended)

  1. Merge or close any open Alloy pull request first.
  2. Edit in your editor, commit and push to main (or merge your branch).
  3. In the Studio click Import changes from main. Resolve conflicts if any.
  4. Prompt again. The new version builds on your edits.

Conflicts

Import compares three versions per file. When both sides changed a file, you choose per file. Nothing is overwritten until you decide, and the result is saved as a new [external] version.

Useful commands

git switch main && git pull           # get merged Alloy work
git switch -c my-change               # your own branch
git push -u origin my-change          # open a PR on your host
git log --oneline --graph --all       # see Alloy branches