BERT DEV

Documentation for the https://bert133.dev infrastructure

Your first Git workflow

This guide assumes you've already set up a Coder workspace (Using Coder) and have it open in VS Code (Visual Studio Code, your code editor) in your browser. We're going to make a small change, save it to Git, and send it back to the team's code on Forgejo — the website where the team stores all of its code.

You will not type any Git commands. Everything happens through buttons in VS Code's sidebar.

What is Git? (one minute)

Git is how the team keeps track of changes to the robot code. Think of it like Google Docs' version history, but for code, and shared with your whole team.

A few words you'll see:

  • Repository (or repo) — a project's folder, with all its files and the history of every change.
  • Commit — a saved snapshot of your changes, with a short message explaining what you did.
  • Push — uploading your commits from your workspace up to Forgejo so others can see them.
  • Pull request (or PR) — asking the team to review and merge your changes into the main code.
  • Branch — a separate line of work, so your changes don't immediately affect everyone else.

That's enough to start. You'll learn the rest by doing.

Step 1 — Find the Source Control panel

In your VS Code workspace, look at the icons running down the left edge of the window. One of them looks like a small forking road or three dots connected by lines — that's the Source Control icon. On a laptop, hover over each icon to see its name in a tooltip; on an iPad, tap each icon to find the right one.

VS Code window with the Source Control icon highlighted on the left activity bar
The Source Control icon (it looks like three dots connected by lines) sits on the left activity bar of VS Code.

Tap it. The Source Control panel opens.

If you haven't changed anything yet, this panel will not show any files. Good — that means your code matches what's on Forgejo.

VS Code Source Control panel showing no changes
What the Source Control panel looks like with no changes — your files match what's on Forgejo.

Step 2 — Make a small change

Let's create something tiny just to practice.

  1. Tap the Explorer icon (top-most icon in the left sidebar — looks like two stacked pages).
  2. Find any text file in the project — for example README.md. Tap it to open.
  3. Type something at the bottom. It can be anything: This is my first change.
  4. Save the file: Ctrl+S on a laptop, Cmd+S on a Mac, or on iPad press ⌘+S if you have a keyboard. Without a keyboard, open the ... menu at the top right of the editor and tap Save.
VS Code editor showing a README.md file with a new line added at the bottom
A small edit to README.md. Anything works — the point is just to give Git something to track.

Now go back to the Source Control panel. You'll see the file you changed listed under Changes, with an M next to it (for "Modified").

Source Control panel showing one modified file under Changes with an M badge
Your edited file appears under Changes with an M (Modified) badge next to it.

Step 3 — Stage your change

"Staging" means choosing which changes you want to include in your next snapshot. (You can edit ten files but only commit two of them.)

  1. In the Source Control panel, find the file name under Changes.
  2. To the right of the file name, look for a small + button. (On a laptop, you may need to hover the mouse over the file for it to appear.) Tap it.
Source Control panel with the plus button highlighted next to a changed file
The little + button next to a changed file. Tap it to stage that file.
  1. The file moves from Changes to a new section called Staged Changes.

If you change your mind, tap the (minus) button next to the file under Staged Changes to unstage it.

Step 4 — Write a commit message and commit

  1. At the top of the Source Control panel, you'll see a text box that says "Message (Ctrl+Enter to commit)".
  2. Type a short message describing what you did. Good messages are specific:
    • Add note to README about my first change
    • stuff
    • fixed it
Source Control panel commit message text box at the top
The commit message box at the top of the Source Control panel. Type a short description of what you changed.
  1. Tap the ✓ Commit button above the message box (or press Ctrl+Enter / Cmd+Enter if you have a keyboard).
Source Control panel with the Commit checkmark button highlighted
The ✓ Commit button above the message box. Tap it to save your snapshot.

The Source Control panel goes back to "No changes". Your commit is saved — but only on the workspace. Forgejo doesn't know about it yet.

Step 5 — Push to Forgejo

  1. At the very top of the Source Control panel, tap the ... (three-dot menu).
  2. Choose Push.
Source Control three-dot menu open showing the Push option
The ... menu at the top of the Source Control panel. Choose Push to send your commit up to Forgejo.

VS Code uploads your commit to Forgejo. This usually takes a second or two.

You shouldn't be asked for a username or password. Coder set up your Forgejo credentials when you connected your account back in Step 3 of the Coder guide. If you are asked for a password, the connection didn't work — go back to the Coder guide and re-do the "Connect Coder to Forgejo" step.

Step 6 — Open a pull request

Your change is now on Forgejo, but it's on your branch, not the team's main code. To suggest your change get merged in, you open a pull request.

  1. Open a new browser tab and go to https://forge.bert133.dev. If it asks you to log in, tap "Sign in with BERT" — same SSO account you used for Coder.
  2. Find the repository you were working in. It's listed on your dashboard, or under your team's organization.
  3. Near the top of the repository page, you'll often see a green banner: "You pushed to branch X less than a minute ago." Tap the New pull request button on the right side of that banner.
Forgejo repository page with a green banner showing the New pull request button
The green banner Forgejo shows right after you push a branch. Tap New pull request on the right to start the PR.
  1. If you don't see the banner, tap the Pull Requests tab, then tap New pull request, and pick your branch.
  2. Give your pull request a title (the commit message is fine) and a short description of what you changed and why.
Forgejo new pull request form with title and description fields
The new pull request form. Give it a clear title (the commit message is fine) and a short description of what you changed.
  1. Tap Create Pull Request.
Forgejo page showing a freshly created pull request open for review
Your pull request, now open. A mentor or another student will review it from here, leave comments, and either approve or ask for changes.

A mentor or another student will review your change, leave comments if needed, and either approve and merge it or ask you to make adjustments.

What if something goes wrong?

A few common situations:

  • "Authentication failed" when pushing. Your Coder–Forgejo connection has expired or wasn't set up. Go back to the Coder guide, Step 3.
  • Source Control panel shows lots of files I didn't touch. Don't commit them. Tell a mentor — usually it means a tool ran and produced output that shouldn't be saved.
  • You committed the wrong thing. Don't try to "fix it with another commit" by deleting things. Stop, ask a mentor, and they'll help you undo cleanly. Git is forgiving if you ask for help early.
  • VS Code says "Sync Changes" instead of "Push". That works too — it pushes your commits and pulls down anyone else's at the same time. Tap it.

What's next?

Practice makes this feel normal. Try it again with a real change. After a few rounds you'll stop thinking about Git and start thinking about the robot code.