Pull with rebase
A regular pull is fetch + merge, but what you want is fetch + rebase. This is an option with the pull
command:
git pull --rebase
In your particular case, commits have been removed which you don't want to be reapplied. This has to be done manually. Therefore, the rebase needs to be interactive so these commits can be skipped:
git pull --rebase=interactive
or as of Git 2.26 can be shortened to:
git pull --rebase=i