Quantcast
Viewing latest article 3
Browse Latest Browse All 10

Answer by Shahid Kamal for Create a repo in Gitlab using CLI

Now gitlab support creating new repo just by giving a URL. If your gitlab username is shahidcodes then you can just do below steps -

git init # init a repo if you don't have alreadygit remote add origin https://gitlab.com./<your_username>/<new_repo_name>git push -u origin master

You will see below message from git output

remote: The private project shahidcodes/new_repo_name was successfully created.remote:remote: To configure the remote, run:remote:   git remote add origin https://gitlab.com/shahidcodes/new_repo_name.gitremote:remote: To view the project, visit:remote:   https://gitlab.com/shahidcodes/new_repo_nameremote:remote:remote:To https://gitlab.com/shahidcodes/new_repo_name * [new branch]      master -> masterBranch 'master' set up to track remote branch 'master' from 'origin'.

By default, GitLab will create a private repo. And there seems no way to configure it to create public.


Viewing latest article 3
Browse Latest Browse All 10

Trending Articles