Git
This page describes some commands of git, which is used as version control system within Workflow Tutor. Git itself has a very extensive help system, which will be started typing git or git -h. git help -g provides a list of concept guides, whereas git help -a shows a list of all commands. From there, it is easy to follow the advices.
Furthermore, it provides advices with each command for the next potential steps (which can be deactivated for an experienced user). For me, it helps.
Git Setup
Two Git repos cover the Workflow Tutor and its documentation: The »main« repo in the project folder workflow-tutor, and a secondary repo in the folder workflow-tutor/pages, which are the static pages created by the build process of MkDocs. Codeberg expects the latter in the branch »pages« of the repo, from where it will be displayed on https://<user>.codeberg.page/<repo> (in this case https://rokor.codeberg.page/workflow-tutor).
Init of Branch »main«
The initialization of the main repository is straight forward, where the remote repo has to exist (as empty repo) beforehand:
git init
git add -A
git commit -m "Initial commit"
git remote add origin https://codeberg.org/rokor/workflow-tutor.git
git push
Keep in mind
The static help page pages must be excluded from from branch main within .gitignore.
Init of Branch »pages«
The steps for the documentation repo are:
git init # Init of the local repo
git branch -m pages # Rename this branch to »pages«
git add -A # Add and commit the built mkdocs pages
git commit -m "Initial commit"
git remote add origin https://codeberg.org/rokor/workflow-tutor.git # Add the remote repo
git push -u origin pages # Push to branch »pages« (-u is important!)
Further Git commands
git status # See git's local status, mainly the staging area and the working directory
git branch # Show local branches
git tag -a <tag name> -m "<tag message>" # Create and push tags
git push --tags origin # It might be reasonable to tag published versions vx.x.x (code) and px.x.x (pages)