Initialise an empty repo.
$ mkdir repo
$ cd repo
$ git init -b main
$ echo "repo" > readme.md
$ touch .gitignore
$ git add .
$ git commit -m "Initial commit."
$ git checkout -b next
Do all work on feature branches off next. When next is ready for release merge 'next' onto main.
$ git checkout main
$ git merge next
$ git push -u origin main
$ git checkout next
If changes are made on a branch and you only want to commit some of them just do a mixed reset to a previous commit and then stage and commit as necessary.
$ git checkout -b tmp
$ git reset --mixed 'commit hash'
Cherry picks are great
$ git cherry-pick 'commit hash'
Update submodules
$ git submodule update --recursive