How to ship software to production

…or just get the code merged.

Sturdy encourages shipping small incremental changes, so it optimizes for making the "code — describe changes — ship" loop as tight as possible.

Jump to: Sturdy for GitHub ⤵️


ℹ️ These instructions are for codebases on Sturdy that are not connected to GitHub, or where Sturdy is the source of truth. Go to Sturdy for GitHub for instructions when using Sturdy on GitHub with GitHub as the source of truth.

With Sturdy setup and connected to a directory on your computer:

  1. Create a new draft change, and give it a good name
  2. Open the directory with the code in any text editor (tip: use the “Open in Visual Studio Code”-button)
  3. Make the changes to your code
  4. Go back to Sturdy, and navigate to the draft from the sidebar
  5. Optional: Undo changes you would like to dismiss
  6. On the top of the page, use the description box to describe the changes that you have made
  7. Optional: Resolving conflicts [go to]
  8. Optional: Asking for feedback [go to]
  9. Optional: Syncing on top of changelog [go to]
  10. After writing a description, the “Merge” button will appear
  11. Click “Merge” to land all of the changes on top of the changelog, and to allow other drafts to be based on top of your code
  12. After the change is shared, a new draft change will be created for you, so that you're ready to code right away

Sturdy for GitHub

ℹ️ These instructions are for codebases on Sturdy that are connected to GitHub and where GitHub is the source of truth.

Using Sturdy on with the GitHub bridge is similar to Sturdy without the git-bridge (standalone Sturdy), with some differences:

  1. Follow step 1 to 10 of the instructions for Sturdy without GitHub [go to]
  2. After writing a description, the “Create pull request” button will appear
  3. Click “Create pull request” to use Sturdy to a PR to the connected GitHub repository. A single commit will be created containing all of the changes in the draft change. The draft title and description will be used as the description of the commit, and the title/description of the pull request.
  4. Optional: If the above fails, debug GitHub errors [go to]
  5. New buttons will appear. “Go to pull request”, “Update pull request”, and “Merge”.
  6. “Go to pull request”: Open the PR in the browser
  7. “Update pull request”: update the PR title, description, and code from Sturdy.
  8. “Merge”: Merges the PR, it’s the same action as hitting “Merge” on GitHub, but without leaving Sturdy.
  9. Click “Merge” to merge the PR. After a few seconds the PR will be merged, and Sturdy will prepare a new and empty draft change for you to keep working in.

Help and debug

Optional: Undo changes you would like to dismiss

Using the checkbox on the left of file changes mark one or multiple changes you would like to dismiss

In the blue banner at the top of the screen press "Undo" (NB: This action cannot be reversed)

The changes that you had selected are removed from your draft

Optional: Resolving conflicts

If the changes in the draft are conflicting with recent changes in the codebase, you have a conflict. Conflicts happen when two drafts make changes to the same piece of code.

A banner will be shown in the draft change if it’s conflicting.

  1. To start resolving a conflict, click “Sync” in the upper right corner
  2. For each file with conflicts, you now have three options.
    1. Pick the version of the entire file as it is on trunk
    2. Pick the version of the entire file as it is in your draft change
    3. Create a mix of the two (“Custom” resolution)
  3. Custom resolution:
    1. If you want to create a custom resolution, pick “Custom”. And open the file in your editor. It will now contain both versions of the file at the same time, using Git conflict markers (<<<<<<<, =======, >>>>>>>).
    2. Edit the file to your liking.
  4. When a resolution (trunk, draft, or custom) has been picked for each file. Mark the conflicts as completed by clicking “Done”.
  5. The draft change should no longer have any conflicts, and the changes are ready to be shared.

Optional: Asking for feedback

ℹ️Sturdy makes it super easy to give feedback and suggest code to one another. It embraces working in the open within the team and favours early feedback over "reviewing" after the fact.

It might be a good idea to ask for some feedback from a colleague before sharing the changes. When browsing a draft change in Sturdy, use the “Ask for feedback” button on the right sidebar to ask someone to take a look at your code. They can either give you a thumbs up, or give you a comment with feedback.

Optional: Syncing

After creating the draft, if new changes land on the changelog (either from others on the team or from you via another draft), these changes are not available in your draft by default.

If there are new changes available, the "Sync changes" button will indicate this with a blue flash.

To rebase your draft change on the latest changes:

  1. Press the “Sync changes” button
  2. Optional: Resolve conflicts [go to]

It is not required to manually sync changes before sharing. This will be performed automatically.

Debugging GitHub errors

The GitHub bridge from Sturdy ("Sturdy for GitHub") requires your user to have PUSH/WRITE permissions to the main repository (PUSH permissions to a fork is not enough).

Sturdy will push to branches on the pattern sturdy-pr-${UUID}, make sure that there are no branch protection rules blocking pushes to branches with this pattern.