Overview
To merge main into development, first switch to development:
git checkout development
Then merge main:
git merge main
Development now includes its own commits plus the relevant changes from main.
To bring development into main, switch to main and merge development:
git checkout main
git merge development
The branch named after git merge is the source of incoming changes. The current branch is the destination that receives them.
This current-branch rule is essential. The same command name produces a different result depending on which branch is checked out.