Setup new repo

git clone https://gitlab.com/domain/myproject.git
# or
git clone git@gitlab.com:domain/myproject.git
cd myproject
git switch --create main
touch README.md
git add README.md
git commit -m "add README"
git push --set-upstream origin main

Push an existing folder

cd existing_folder
git init --initial-branch=main --object-format=sha1
git remote add origin https://gitlab.com/domain/myproject.git
# or
git remote add origin git@gitlab.com:domain/myproject.git
git add .
git commit -m "Initial commit"
git push --set-upstream origin main

Push an existing Git repository

cd existing_repo
git remote rename origin old-origin
git remote add origin https://gitlab.com/domain/myproject.git
# or
git remote add origin git@gitlab.com:domain/myproject.git
git push --set-upstream origin --all
git push --set-upstream origin --tags