fritz@laptop:~/.ssh$ ssh -T git@gitlab.com
Welcome to GitLab, @tallharry66!
fritz@laptop:~/.ssh$
####
cd existing_repo
git remote add origin https://gitlab.com/perlmonks/betelgeuse.git
git branch -M main
git push -uf origin main
##
##
fritz@laptop:~/Documents/gitlab1$ git init
Initialized empty Git repository in /home/fritz/Documents/gitlab1/.git/
fritz@laptop:~/Documents/gitlab1$ ll
total 36
drwxrwxr-x 4 fritz fritz 4096 Dec 19 13:07 ./
drwxr-xr-x 10 fritz fritz 4096 Dec 17 16:47 ../
-rwxrwxr-x 1 fritz fritz 1122 Dec 17 00:34 1.betelgeuse.pl*
-rwxrwxr-x 1 fritz fritz 1916 Dec 18 22:44 2.betelgeuse.pl*
-rwxrwxr-x 1 fritz fritz 1890 Dec 18 22:38 2.betelgeuse.pl.bak*
-rwxrwxr-x 1 fritz fritz 1783 Dec 18 23:57 3.betelgeuse.pl*
-rwxrwxr-x 1 fritz fritz 1737 Dec 18 23:51 3.betelgeuse.pl.bak*
drwxr-xr-x 2 fritz fritz 4096 Dec 15 21:44 conf_files/
drwxrwxr-x 7 fritz fritz 4096 Dec 19 13:07 .git/
fritz@laptop:~/Documents/gitlab1$ git remote add origin https://gitlab.com/perlmonks/betelgeuse.git
fritz@laptop:~/Documents/gitlab1$ git branch -M main
error: refname refs/heads/master not found
fatal: Branch rename failed
fritz@laptop:~/Documents/gitlab1$ git push -uf origin main
error: src refspec main does not match any
error: failed to push some refs to 'https://gitlab.com/perlmonks/betelgeuse.git'
fritz@laptop:~/Documents/gitlab1$