Testing git in VSCode

Staging initial changes

Once your installation is complete:

  1. Restart your VSCode
  2. click on the icon in the left side bar that is shaped somewhat like a V
  3. Click on Initialize repository

Initialize git repo

Once you do that, your sidebar will look something like this:

Initialized BakeItMan repo

Now hover over the changes section right where it sums up the number of untracked files (e.g. 16). When you do that VSCode will show a couple of buttons including a plus button that says stage all changes when you hover over it:

Initial stage

Click that plus button so everything gets staged.

Doing some minor improvements

Then go back to the file explorer & remove the following line from both Levels/Intro.cs & Main.cs:

// Called when the node enters the scene tree for the first time.

This line starts with // which is meant as a commentary rather than code that executes. When we're coding however comments like this get outdated very fast because almost every tool is built around code rather than the comments. What need to be done instead of comments like this is writing readable code. Although not very detailed, its already clear that _Ready only executes once in these files.

We're not going to do the same for _Process however, since the name by itself doesn't tell us anything about being processed every frame. Since this is a method Godot is expecting we can't just change its name either. We can work around this, but for now the easiest solution with the material covered until now is to leave the comment.

But what is with all that ceremony?

If you followed the tutorial until now, you might be asking where all those names like public, override & void come from. Wasn't this tutorial supposed to cover those details? That's what we're going to discuss in the next page. So hold your horses.

Comparing with staged changes

Since you made some edits after staging your files, VSCode will now show both "Staged Changes" and "Changes" sections in the Source Control sidebar.

  • Staged Changes: What you already prepared for your next commit (your "save").
  • Changes: New edits you made after staging.

To see exactly what you changed since staging:

  1. Look for the files listed under both sections.
  2. Click on a file in the "Changes" section.
  3. VSCode will show a side-by-side comparison:
    • The left side shows the version you staged.
    • The right side shows your latest edits.

VSCode compare staged vs unstaged

This lets you review what you changed after staging, so you can decide if you want to stage these new edits as well, or undo them if your improvement/polishing process didn't go as you expected.

Update & commit staged changes

This time, rather than just pressing "stage all changes":

  1. Stage all changes as explained earlier on this page.
  2. Enter a message like Initial game setup in the message box.
  3. Click Commit

At this stage, VSCode may ask you to configure your user.name and user.email for Git. This information is used to label your commits with your name and email address.

To set these up, open the terminal panel at the bottom of VSCode (Ctrl + `), and enter the following commands (replace with your own name and email):

git config --global user.name "Your Name"
git config --global user.email "your@email.com"

After you commit, VSCode will show a simple graph in the Source Control sidebar. Each dot in the graph represents a commit, and next to it you'll see the commit message you entered.

VSCode commit graph

This graph helps you:

  • Visualize the sequence of changes you’ve made.
  • Quickly find specific steps in your project history by their commit messages.
  • Track your progress as your project grows.

That's it for this part. In the next parts, we’ll start with some additional configuration to further simplify the workflow. After that, we’ll return to the intro scene and continue working toward the final game logic and setup, including some modeling steps along the way.

This is a work in progress

I still need to write those parts yet, so be patient with me and come back on a regular basis to see if those parts are there yet