LinkedIn Sourceforge

Vincent's Blog

Pleasure in the job puts perfection in the work (Aristote)

My day to day with got (gameoftrees): tips to use this tool correctly

Posted on 2026-03-01 16:32:00 from Vincent in got

Photo by Jack Skinner on Unsplash In this post share some of the tips I'm using with got (Game of trees). This page will evolve surely in the future

.


Source of information concerning got

First of all, I strongly recommend readers to got to the official website: www.gameoftrees.org.
And specially the ma pages and list of samples

Syncing my local branch with my gotd server

When working with Game of Trees across multiple machines, I was in a situation where my local main branch is behind the server. This happens for example when I committed and pushed changes from a second dev machine, and I come back to my first machine where the local main branch is no longer up to date.

got fetch

Running got fetch will download the new commits from the server into my local remote tracking reference origin/main, but it will not update my local main branch automatically. I can confirm this by running got branch -l, which will show main and origin/main pointing to different commit hashes.

To understand the distinction: main is the local working branch, while origin/main is the remote tracking reference that reflects the state of the branch on the server after a fetch.

To bring my local main up to date, the correct sequence of commands is:

got update -b origin/main
got rebase main

The first command switches the working tree to origin/main. The second command rebases main on top of origin/main, fast-forwarding it to the latest server state, and directly puts me back on the main branch.
After these two commands, my local main is fully in sync with the server and you are ready to continue working.

Here's a revised version:

Resolving a rebase conflict

Today I hit a rebase conflict while using got. After running got rebase main, it complained about a conflict in one of my files. Here's what to do when that happens.

First, open the conflicted file and manually remove all conflict markers (<<<<<<<, =======, >>>>>>>). Once done, verify none remain with grep -n "<<<<<<" yourfile.

Just run:

got unstage yourfile
got rebase -c

And the rebase will continue cleanly.

Stay tuned for others



👍 0, 👎 0
displayed: 366



What is the first letter of the word Python?