Skip to main content

Pulling upstream changes with Git

We are experimenting with following a workflow where everyone is allowed to work from and commit directly to the dev branch. This comes with a caveat of having your local version of dev frequently becoming out of date with origin/dev (the server's version of dev) as you are working on your local changes. This consequence often leads to a pitfall when pulling changes from origin/dev where contributors end up unnecessarily merging origin/dev into their local dev branch. This creates confusing cruft in the repo that makes it difficult to understand the progression of changes. What actually needs to be done is to simply fast forward or rebase.

ThereThe areroot twocause changesis that willGit helpdefaults preventto thisfast-forward issueor frommerging occurring.when pulling. We need to change the default pull strategy to rebase.

On Windows, you can make this change while installing Git therewhen isyou aget to the prompt in the installer asking "What should `git pull` do by default?". It defaults to Fast-forward or merge,merge. but what weYou need isto Rebase.
set it to Rebase like this:

Screenshot from 2026-02-17 23-54-15.png

Note: If you leftdid not change the default pull strategy in the installer, you can still change it onmanually from the default,command thenline. youSee willbelow.

need

On MacOS / Linux, installing git works differently and does not have an installer like on Windows. However, the default pull strategy is still fast-forward or merge, and still needs to updatebe yourchanged Gitto settings.rebase.

In

On eitherall platforms, in a command prompt or/ terminal set the pull.rebase option to true with the following command:
git config --global pull.rebase true

In SourceGit, with the above Git configuration change, it should default to use the Git pull strategy configuration. Still, make sure when you are pulling that the checkbox for "Use rebase instead of merge" is checked before pulling.

It should look like this:
Screenshot from 2026-02-17 23-15-43.png