I stumbled upon a rather strange feature yesterday! It turns out it’s possible to push git repositories from the local computer to GitLab.com (I guess it works for self-hosted version of GitLab as well) without actually having to create the repository first on GitLab.com.
I normally create the upstream repository on GitHub or GitLab.com with a README file, clone it and commit changes from there. Or, I create create a first commit, and set upstream logic with
git remote add origin firstname.lastname@example.org:arunsathiya/repo.git before pushing using
git push -u origin master.
repo is the repository’s name/slug.
But, GitLab.com does not actually require the repository to exist online. Using
git remote add origin email@example.com:arunsathiya/repo.git on a repository pushes that to GitLab.com and automatically creats that non-existent repository online.
All you need is,
GitLab.com would create that repository for you online, and show this result,
Code references from the document linked earlier.