Rebasing replays your commits on top of the latest main, giving a straight history. Only rebase branches that nobody else is working on.
git fetch origin git rebase origin/main # fix conflicts, then: git add . && git rebase --continue git push --force-with-lease