Git
Git keeps every saved step of your project, so you can see what changed, go back when something breaks, try ideas out on a branch, and share your code on GitHub or GitLab. The IDE has Git built into it: a Git window for committing, pulling and pushing, change marks beside your code, and a history of every file.
What You Need
The IDE uses Git itself. Most Linux systems have it already; if yours hasn't, the Git window says so. Install it with your package manager (sudo apt install git on Debian and Ubuntu, sudo pacman -S git on Arch), then press Check again. If Git is somewhere unusual, Choose git... points the IDE at it. The IDE runs your own git, so it uses your usual Git settings and logins.
A free GitHub or GitLab account is only needed if you want a copy of your project online.
Where to Find It
Everything is under View > Git:
- Git Window (Ctrl+Shift+G) - Commit, pull, push, branches and history
- Project History... - The commits of your Git project
- History of This File... - The commits of the file you're editing
- Compare with Last Commit (Ctrl+Shift+K) - This file next to its last committed version
- Changes in the Margin - Turns the change marks beside your code on or off
Right-clicking in the editor has the same file commands. The right-hand end of the status bar shows your Git project, for example Git: main · MyGame ●3 ↑1: the branch, the project, 3 changed files, and 1 commit waiting to be pushed. Click it for the branch menu.
A Few Words First
- Repository - A folder that Git looks after. Git keeps its records in a hidden .git folder inside it
- Commit - A saved step: the files as they are now, with a message saying what changed
- Push - Send your commits to the online copy
- Pull - Bring other people's commits (or your own from another PC) down from the online copy
- Branch - A separate line of commits, so you can try something without disturbing the main one (called main or master)
- Merge - Bring one branch's changes into another
Choosing a Git Project
The Git window always works on one Git project that you choose. Commit, Pull and Push only cover that project's folder, whatever else you have open in the editor.
- New Repository... - Start using Git for a folder that isn't in Git yet. It offers a .gitignore that leaves out the files BambooBasic builds for you (the generated .cpp and .h, the program itself, .o, WebOutput and so on), since they're remade on every build. You can also paste the URL of an empty repository you've made on GitHub or GitLab. Every file starts ticked, so press Commit to make the first commit
- Connect to Repository... - Use a repository that's already on your PC, or copy one from a URL (a clone). You can choose a folder inside a repository to work on just that part, for example one game in a repository that holds several
- Recent Projects - Switch between the projects you've used
- Disconnect - Stop using a project in the Git window. Nothing is deleted
If you lock a build file while a project is chosen, the IDE remembers that project for it: locking that file again brings its project back. If you open a file that's in a repository and no project is chosen, the window offers Use this repository. It never picks one by itself.
The Git Window
At the top are the project's name, its folder and its branch, with how many commits are waiting to be pushed or pulled. The Project... button has New Repository, Connect, Recent Projects, History, Open Project Folder, Git Settings and Disconnect.
- The changes list - Every file that's different from the last commit. new is a file Git hasn't seen before, M changed, D deleted, R renamed. Click one to see its changes underneath, added lines in green and removed ones in red
- Tick boxes - Only ticked files go into the commit. They all start ticked, and the box at the top ticks or unticks them all
- Show all changes in the repository - Also lists changes outside your project's folder
- Commit message - A line saying what changed. More lines underneath if you like. Ctrl+Enter commits
- Amend the last commit - Change the last commit (its message, or files you forgot) instead of making a new one. Best only before you've pushed it
- Commit / Commit & Push - Make the commit, and push it straight away if you like
- Pull, Push, Fetch - Fetch only checks the online copy for new commits, without bringing them in
- Refresh - Look again. The window also refreshes by itself when you save, switch tabs or come back to the IDE
The box at the bottom shows what Git said, which is the place to look if something didn't work.
Before a commit, pull or branch switch, the IDE offers to save any unsaved files in the project. After a pull, open files that changed are reloaded.
Your Name and the Online Copy
Every commit is signed with a name and email. The first time you commit, the IDE asks for them if Git doesn't have them yet. Project... > Git Settings changes them, for all your repositories or just this one. Remember they're public if you push to a public repository.
Git Settings is also where you set or change the online repository's URL.
Signing in. The IDE can't ask for a password while Git runs, so Git needs a login it can use by itself before you push to (or pull from) a private repository. Set up one of these once, in a terminal:
- GitHub, the easy way - install the GitHub CLI (gh), then run gh auth login and gh auth setup-git. Git then signs in through gh
- A credential helper - git config --global credential.helper libsecret keeps the login in your desktop's keyring (store works too, but keeps it in a plain file). Push once from a terminal and type the login there (for GitHub, a personal access token, not your password); Git remembers it after that
- SSH - use the SSH address (git@github.com:you/project.git) in Git Settings, with your SSH key added to GitHub or GitLab and loaded in your SSH agent
The IDE never sees or stores your password or token. If a push says Git couldn't sign in, that's the message's cue to set one of these up.
Pushing and Pulling
- Push lists the commits it's about to send before it sends them. A new branch is linked to the online copy the first time it's pushed. Push sends every commit on the branch that isn't online yet, including ones for other projects in the same repository
- Pull only brings changes in when nothing clashes with yours. If both sides have new commits, it asks before merging them together
- If Push says the online copy has commits you haven't got, Pull first, then push again
Change Marks Beside Your Code
For any open file that's in a repository, a thin bar beside the code shows what's changed since the last commit. It updates as you type:
- Green - New lines
- Blue - Changed lines
- Red triangle - Lines were deleted here
Click a mark to see the old lines next to the new ones. Put the old lines back undoes just that change (or Remove these lines for new ones). Ctrl+Z brings it back. Files Git leaves out (like the generated .cpp) get no marks, and a file that's never been committed shows as all new.
A tab whose file differs from its last commit has a dot after its name: MyGame.bam ●.
Compare with Last Commit shows the whole file side by side with its last commit, lined up and scrolling together, unsaved changes included. Previous change and Next change jump between the differences.
Revert File to Last Commit... (right-click in the editor) puts the whole file back the way it was at the last commit. It happens in the editor, so Ctrl+Z still brings your changes back until you close the file.
History
History (in the Git window, or View > Git) lists the project's commits, newest first. History of This File shows only the commits that changed one file, following it through renames.
- Click a commit to see its message and its files. Click a file to see what that commit changed in it
- Open This Version - The selected file as it was in that commit, read-only. Save a Copy As... writes it out if you want it back
- Compare With Yours (or double-click the file) - That version next to your current one
- Undo This Commit... - Makes a new commit that takes that commit's changes back out. The old commit stays in the history, so nothing is lost, and it's safe to do after pushing
- Copy Commit ID - For when someone asks which commit
- Show Older Commits - The list loads 300 at a time
Branches
The Branch... button in the Git window (or a click on the Git part of the status bar) opens the branch menu:
- Switch to branch - The ticked one is where you are
- Online branches - Branches that are only online so far. Picking one makes it here too and switches to it
- New Branch... - Starts from where you are and switches to it
- Merge into ... - Brings another branch's changes into yours
- Delete Branch - Asks again if the branch has commits that aren't anywhere else
- Bring Back Put-Aside Changes - See below
If you switch with changes you haven't committed, the IDE asks whether to Commit first or Put them aside (Git calls it a stash). Put-aside changes wait until you choose Bring Back Put-Aside Changes from the branch menu, on whichever branch you like.
When Changes Clash
If a merge (or a pull that merges, or an undo) finds that both sides changed the same lines, Git can't choose between them, so it's up to you:
- A yellow bar appears in the Git window saying how many files clash, and those files are marked clash in the list
- Open one. Each clash is coloured: your lines in blue, theirs in orange, with an orange bar beside them
- Click the orange bar (or right-click inside the block and choose Sort Out the Clash Here...). Both sides are shown, and you choose Keep yours, Keep theirs or Keep both. You can still edit the result afterwards, and Ctrl+Z undoes the choice
- When a file has no clashes left, save it. The list then says fixed
- When nothing clashes, press Commit. The message is filled in for you. A merge is always committed whole, not just the ticked files
- Or press Abort on the yellow bar to give up and go back to how things were before
If Something Goes Wrong
- Git wasn't found - Install Git with your package manager, or point the IDE at it with Choose git...
- It asks for your name and email - Git needs them once, for signing commits
- Couldn't sign in - Check the URL in Git Settings, and that your account is allowed to push there
- Push was refused - The online copy has commits you haven't got. Pull, then push
- It would overwrite changes you haven't committed - Commit them (or put them aside) first, then try again
- Anything else - The box at the bottom of the Git window shows exactly what Git said
The IDE runs the same Git you'd use in a terminal, so anything you do there (or in another Git program) shows up in the IDE too.
BambooBasic © 2026 Michael Denathorn