In this article We are going to perform What is GitLab, How to open account on GitLab, How to create a new project in GitLab?, Push file/code to GitLab, clone project from GitLab and delete project from GitLab.
Table of Contents
What is GitLab ?
GitLab is an open source tool that provides code repository and collaborative software development platform for large DevOps and DevSecOps projects, allowing professionals to perform all project tasks.. GitLab is free for individuals. GitLab offers a location for online code storage and capabilities for issue tracking and CI/CD.
Features of GitLab:
- GitLab is simple to set up and an easy-to-use UI and tools.
- GitLab supports free public and private repositories and comes with an in-built registry that can be deployed immediately without any configurations.
- GitLab is faster system which can be used for code deployment and development.
- GitLab’s built-in code review, code testing, code quality, and audit applications help to detect errors faster and shorten feedback cycles.
- GitLab managing git repository.
- GitLab CI (Continuous Integration) is a software services that builds and test the software whenever developer pushes code to application.
- GitLab CD (Continuous Deployment) is a software service that places the changes of every code in the production which results in every day deployment of production.
Why to use GitLab ?
The applications of GitLab provide the functionality to make automation of the complete DevOps which makes a plan to design, create, build, verify, test, deploy, and monitoring on scalability, reputation, availability, and replication.
How to open account in GitLab ?
Go to GitLab official website and click on register now OR simply you can login with Google account OR If you have an account of GitHub then login in with GitHub.
![How to Create a New Project in GitLab [2 Steps] 1](https://www.devopshint.com/wp-content/uploads/2023/07/login1.png)
I will go with register now and Confirm your mail id and proceed with its access.
Select the role and Create new project with GitLab
![How to Create a New Project in GitLab [2 Steps] 2](https://www.devopshint.com/wp-content/uploads/2023/07/role.png)
Fill the Group name and Project name and click on create project.
![How to Create a New Project in GitLab [2 Steps] 3](https://www.devopshint.com/wp-content/uploads/2023/07/create-project.png)
GitLab is ready to get started. Click on OK, Let’s go.
![How to Create a New Project in GitLab [2 Steps] 4](https://www.devopshint.com/wp-content/uploads/2023/07/ok-lets-go.png)
OR
How to create a new project in GitLab ?
To create a new project in GitLab, Firstly Login in with GitLab.
Click on new project.
![How to Create a New Project in GitLab [2 Steps] 5](https://www.devopshint.com/wp-content/uploads/2023/07/new-project-1024x361.png)
After that get Create new project page and click on create blank project.
![How to Create a New Project in GitLab [2 Steps] 6](https://www.devopshint.com/wp-content/uploads/2023/07/create-blank-project-1024x499.png)
Fill the project name , select visibility level and click on create project.
![How to Create a New Project in GitLab [2 Steps] 7](https://www.devopshint.com/wp-content/uploads/2023/07/fill-info-1024x596.png)
Get message like Project was successfully created.
![How to Create a New Project in GitLab [2 Steps] 8](https://www.devopshint.com/wp-content/uploads/2023/07/get-msg-1024x395.png)
We have covered How to Create a New Project in GitLab.
How to Push file/code to GitLab ?
Go to file/code which is you have to push on GitLab and right click on this page open git bash.
Initialize Git in the project folder
Make sure you are in the root directory of the project you want to push to GitHub and run:
git init
Add a new remote origin
git remote add origin https://gitlab.com/devops2421227/dev.git
Add the files to Git index
git add .
Commit Added Files
git commit -m "Initial commit"
To check the git branch
git branch
Push to GitLab
git push origin master
![How to Create a New Project in GitLab [2 Steps] 9](https://www.devopshint.com/wp-content/uploads/2023/07/push.png)
After that you have refresh the GitLab page and you will get file which is git push.
![How to Create a New Project in GitLab [2 Steps] 10](https://www.devopshint.com/wp-content/uploads/2023/07/push-2.png)
How to clone project from GitLab?
If you have Clone project from GitLab simply you will copy the link of project means its clone with HTTPS link.
![How to Create a New Project in GitLab [2 Steps] 11](https://www.devopshint.com/wp-content/uploads/2023/07/clone.png)
Go to folder where you have clone project and open Git Bash after that using below command you clone the project.
git clone https://gitlab.com/devops2421227/demo.git
![How to Create a New Project in GitLab [2 Steps] 12](https://www.devopshint.com/wp-content/uploads/2023/07/clone2.png)
Output:
![How to Create a New Project in GitLab [2 Steps] 13](https://www.devopshint.com/wp-content/uploads/2023/07/clone-output.png)
How to delete project from GitLab / GitLab Delete Project ?
If you want to delete project go inside that project.
![How to Create a New Project in GitLab [2 Steps] 14](https://www.devopshint.com/wp-content/uploads/2023/07/setting-1024x109.png)
Go down and click on Delete project.
![How to Create a New Project in GitLab [2 Steps] 15](https://www.devopshint.com/wp-content/uploads/2023/07/delete-project.png)
Confirm the delete GitLab project.
![How to Create a New Project in GitLab [2 Steps] 16](https://www.devopshint.com/wp-content/uploads/2023/07/click-yes-delete.png)
In this article We have covered What is GitLab, How to open account on GitLab, How to create new project in GitLab?, Push file/code to GitLab, clone project from GitLab and delete project from GitLab.
Related Articles: