pesader

Keep your branch up to date with upstream

First, pull the upstream changes to your main branch

git remote add upstream https://gitlab.com/$MAINTAINER/$REPONAME
git pull upstream main

Then, rebase your own branch to main:

git checkout $BRANCH
git rebase main

In this case, it is better to rebase instead of merge, because merging will create a commit while rebasing won’t.

Published on April 2, 2023.