I had misunderstood the .gitpod.yml syntax, the tasks section should be at the top level rather than, as I had it, under prebuilds.

github:
   prebuilds:
     master: true
     # etc ... lines elided
tasks:
    - name: "Lefty"
      before: |
          echo "In $(pwd)"
      init: |
          echo "Could npm install here"
      command: |
          echo 'left'
    - name: "Dexter"
      command: |
          echo 'right'
      openMode: split-right

I checked that restructured .gitpod.yml file into git, started a new workspace and saw the scripts run in split windows.

The take-away idea is that the tasks stanza is independent of the particular git you are using; in my case the github stanza determines when the before, init and command scripts are run.

Answer from djna on Stack Overflow
🌐
Ona Documentation
ona.com › configure › workspaces › workspace image
Workspace Image - Gitpod Classic
March 16, 2026 - Sometimes you find yourself in ... can trigger a workspace image rebuild with the following URL pattern: https://gitpod.io/#imagebuild/<your-repo-url>....
🌐
GitHub
github.com › gitpod-io › workspace-images
GitHub - gitpod-io/workspace-images: Ready to use docker images for Gitpod workspaces · GitHub
By default, Gitpod uses a standard Docker Image called workspace-full as the foundation for workspaces.
🌐
OneUptime
oneuptime.com › home › blog › how to use gitpod for cloud development
How to Use Gitpod for Cloud Development
January 25, 2026 - After committing the file, import the repository in Gitpod and enable prebuilds from the repository settings. You can constrain prebuilds to the default branch, all branches, or branches matching a glob pattern. ... flowchart LR A[Developer Opens Workspace] --> B{Prebuild Available?} B -->|Yes| C[Load Snapshot] B -->|No| D[Run before and init] D --> E[Snapshot Workspace] E --> F[Start Workspace] C --> F F --> G[Run command] G --> H[Workspace Ready] I[Repository Prebuild Trigger] --> J[Run before and init] J --> K[Store Snapshot] K --> B
🌐
GitHub
github.com › gitpod-io › workspace-images › blob › main › base › Dockerfile
workspace-images/base/Dockerfile at main · gitpod-io/workspace-images · GitHub
Increase this counter to rebuild this layer. ... && sed -i.bkp -e '/Defaults\tuse_pty/d' -e 's/%sudo\s\+ALL=(ALL\(:ALL\)\?)\s\+ALL/%sudo ALL=NOPASSWD:ALL/g' /etc/sudoers \ # To emulate the workspace-session behavior within dazzle build env · && mkdir /workspace && chown -hR gitpod:gitpod /workspace
🌐
R-project
contributor.r-project.org › r-dev-env › container_setup › gitpod_workspace › workspacestop_and_restart
Stopping and Restarting - R Devel Container Docs
Open Gitpod Dashboard: Once you're in the Gitpod dashboard, navigate to the "Workspaces" section. In the "Workspaces" section, you will see a list of your current and past workspaces.
🌐
Maier
maier.tech › posts › five-ways-to-customize-a-gitpod-workspace
Five ways to customize a Gitpod workspace - Thilo Maier
November 5, 2025 - With prebuilds enabled, the init portion of the task will run during the prebuild, and the command portion will run when the workspace launches. When you run a development server, you need to let Gitpod know the port of your server and whether a preview should be publicly accessible.
Find elsewhere
🌐
DEV Community
dev.to › terrorjack › gitpod-notes-and-thoughts-3ged
Gitpod notes and thoughts - DEV Community
July 30, 2022 - Having two places to write scripts may seem redundant, but the .gitpod.yml scripts have access to the /workplace directory. Across restarts of the same Gitpod workspace, only changes in /workplace is persisted!
Author: gitpod-io
🌐
DEV Community
dev.to › zenika › manage-your-gitpod-workspaces-with-your-gitlab-cicd-workflow-16n8
Manage your Gitpod workspaces with your GitLab CI/CD workflow - DEV Community
January 19, 2024 - I used the --dont-wait attribute in order not to wait for the state of my workspace. I only need the generated environment id that I put in an env file defined as an artifact report: ... I could stop these commands here, but I would like to have all the information in GitLab. For this, we can use the GitLab Environment and this script allows us to initiate a new environment containing the url to the Gitpod workspace:
🌐
Medium
medium.com › @vaibhavkumar779 › simple-ways-to-create-gitpod-workspace-in-github-9fde04be42c3
Simple ways to create Gitpod workspace in GitHub | by Vaibhav Kumar | Medium
September 2, 2022 - There is a button on the dashboard New Workspace which allows for creating a workspace for every repository on your Github profile. You can also use the Keyboard shortcut CTRL + O to do the same thing. ... You just need to be on the repository page of the browser. In the URL section of the browser, add the line ‘https://gitpod.io/# ‘ before your repository URL.
🌐
SciPy
docs.scipy.org › doc › scipy-1.10.1 › dev › contributor › quickstart_gitpod.html
Development environment quickstart guide (Gitpod) — SciPy v1.10.1 Manual
If you want to see the final output ... and you want to carry on working on your SciPy contributions. You need to visit https://gitpod.io/workspaces and click on the workspace you want to spin up again....
🌐
GitLab
gitlab.com › gitlab.org › gitlab development kit › repository
doc/howto/gitpod.md · main · GitLab.org / GitLab Development Kit · GitLab
Get started with GitLab Rails development using the GDK. https://gitlab-org.gitlab.io/gitlab-development-kit/
🌐
GitHub
github.com › gitpod-io › run-gp
GitHub - gitpod-io/run-gp: Run a local workspace using the .gitpod.yml · GitHub
Note run-gp is not the "real Gitpod experience". Gitpod offers remote development environments which sport many benefits compared to running things locally. Head over to https://www.gitpod.io to find out more. ✅ Image Build: run-gp produces a workspace image based on the image section in the .gitpod.yml.