Some commands are repeated so often, but one may forget the exact syntax
From this stackoverflow comment:
git reset $(git merge-base $(git config --get init.defaultBranch || echo main) $(git branch --show-current)) && git add -A && git commit
git reset $(git merge-base $(git config --get init.defaultBranch || echo main) $(git branch --show-current)) && git add -A && git commit && git fetch && git rebase origin/$(git config --get init.defaultBranch || echo main) -i