Keep your branch up to date with upstream

First, pull the upstream changes to your main branch

git remote add upstream$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.