Development only on feature branches, main branch must be assumed to be deployed.
1. Before starting work, rebase current main into your feature branch
So first, get the latest main branch to your computer
Then, go back to your feature branch and rebase
If that worked and conflicts are ruled out, push the rebased feature branch from your computer to the repo.
However, if conflicts should occur, they need to be manually fixed and then added
2. Merging own feature branch
When a feature is finished and tested, it should be integrated into the main branch for deployment.
So first, repeat the steps from 1 to make sure, the feature branch is compatible with the current main.
Then, open a Pull Request in the UI. Ideally, someone else reviews it before the merge into main is completed.
To avoid ugly merge commit statements, select 'Rebase and fast-forward'.
If frequent PRs are made, it makes sense to select 'Squash and merge', so that small unspecific commits like "fixed typo" are bundled into
a single, more descriptive commit message on main. The detailed commit history is still documented in the PR and on the feature branch.