Creating a new repository on Gitlab

from a local folder

1. change into the folder you like to create a local repository
mkdir newRepository && cd newRepository
2. create a local repository branch
git init -b main
3. add content to the folder
touch README.adoc
4. set new content to the stage
git add README.adoc
5. commit the staged content
git commit -m 'Initial commit'
6. add a remote source on gitlab inside an existing group
git remote add source ssh://git@<yourdomain>:<port>/my-group/newRepository.git
7. push the content to gitlab
git push -u -f source main

from a local repository

see steps 4 - 7 in from a local folder