Steps to Create a New Project on GitLab

What is GitLab ?

GitLab is a free, open-source tool for individuals that offers a code repository and collaborative platform for large DevOps and DevSecOps projects, providing online code storage, issue tracking, and CI/CD capabilities.

Features of GitLab

  • GitLab is a user-friendly platform that supports free repositories, offers a fast system for code deployment and development, includes built-in tools for code review and testing, manages git repositories, and provides CI/CD services for continuous integration and deployment.

Why to use GitLab ?

GitLab's applications enable full DevOps automation, allowing for planning, designing, creating, building, verifying, testing, deploying, and monitoring with a focus on scalability, reputation, availability, and replication.

How to open account in GitLab ?

Visit the GitLab official website to sign up or log in with your Google or GitHub account.

Register now, confirm your email, proceed with access, select your role, and create a new project with GitLab.

How to Create a New Project in GitLab [2 Steps] 2

Fill in the Group name and Project name, then click on create project.

How to Create a New Project in GitLab [2 Steps] 3

GitLab is ready to start; click "OK, Let’s go."

How to Create a New Project in GitLab [2 Steps] 4

OR

How to create a new project in GitLab ?

To create a new project in GitLab, first log in, then click on "New Project."

How to Create a New Project in GitLab [2 Steps] 5

After that, go to the Create new project page and click on create blank project.

How to Create a New Project in GitLab [2 Steps] 6

Fill the project name , select visibility level and click on create project.

How to Create a New Project in GitLab [2 Steps] 7

You will receive a message saying "Project was successfully created."

We have explained how to create a new project in GitLab.

How to Push file/code to GitLab ?

Open Git Bash in the project folder where your file or code is located, initialize Git, ensure you're in the root directory, and prepare to push to GitHub.

git init

Add a new remote origin using the command git remote add origin <repository-url>.

git remote add origin https://gitlab.com/devops2421227/dev.git

Use the command git add . to add the files to the Git index.

git add .

Use the command git commit -m "Commit message" to commit the added files.

git commit -m "Initial commit"

To find out which Git branch you're on, use the command git branch.

git branch

Push the code to GitLab using git push -u origin main.

git push origin master

After that, refresh the GitLab page, and you will see the file that was pushed.

How to clone project from GitLab?

To clone a project from GitLab, copy the project's HTTPS link.

Navigate to the folder where you want to clone the project, open Git Bash, and use the following command to clone it.

git clone https://gitlab.com:cloud8185847/CloudHub.git

How to delete project from GitLab / GitLab Delete Project ?

To delete a project, go to the project you want to remove.

How to Create a New Project in GitLab [2 Steps] 14

Scroll down and click on Delete project.

Confirm the deletion of the project on GitLab.