Switch to the main branch, fetch the latest changes from the remote repository, and rebase the local main branch.
git checkout main && git fetch origin main && git rebase origin/main
Rebase the feature branch on the main branch
git rebase <feature-branch>
Push the updated main branch to the remote repository.
git push origin main