I know that method, to first init an empty repo and then adding remote origin
using command
git remote add origin https://github.com/USER/TEST_REPO.git
for this, we first need to create remote repo at github.com manually, and then pass this url (https://github../TEST_REPO.git) into git remote add command.
I am just finding a way to create that remote repository using command, instead of manually creating from github.com.
I try to find this method at git official docs, from google, already questions asked at stackoverflow and quora etc. But I didn't find any relevant answer.
From Above link, I tried command with my username and desired repo name; but It says, 'Repository not found'
git push --set-upstream https://gitlab.example.com/your-username/nonexistent-project.git master
Any kind of help will be appreciated,