How to install Git and Register in Gitlab.

Create A Repository, Call DevOps, And Clone It Locally

How to install Git

Git is a distributed version control system that is widely used by developers around the world. It allows multiple users to collaborate on a project and track changes to the codebase. In this documentation, we will guide you through the process of installing Git on your computer.

Prerequisites:

Before installing Git, make sure that your computer meets the following requirements:

Operating system: Git is compatible with Windows, Linux, and macOS operating systems.

Disk space: Git requires at least 50MB of disk space.

Internet connection: You will need an active internet connection to download the Git installation files.

Steps to install Git:

Follow these steps to install Git on your computer:

Step 1: Download Git

Go to the official Git website (https://git-scm.com/downloads).

Select the appropriate installer for your operating system. For Windows, you can choose between 32-bit and 64-bit versions, depending on your system architecture.

Click the download button to download the Git installer.

Step 2: Run the installer

Once the download is complete, double-click the installer file to start the installation process.

On the first screen, you will be asked to choose the installation directory. The default location is usually fine, but you can choose a different directory if you prefer.

Click the "Next" button to proceed.

Step 3: Choose components

On the next screen, you will be asked to choose the components to install. By default, all components are selected, and you can leave them as they are.

Click the "Next" button to proceed.

Step 4: Choose the default editor

On the next screen, you will be asked to choose the default editor for Git. You can choose between Vim, Nano, or Notepad++, depending on your preference.

Click the "Next" button to proceed.

Step 5: Adjusting PATH environment

On the next screen, you will be asked to adjust the PATH environment. Choose the option "Use Git from the Windows Command Prompt" if you want to use Git from the command prompt.

Click the "Next" button to proceed.

Step 6: Configure line endings

On the next screen, you will be asked to configure line endings. Choose the default option "Checkout Windows-style, commit Unix-style line endings" and click the "Next" button.

Step 7: Choose HTTPS transport backend

On the next screen, you will be asked to choose the HTTPS transport backend. Choose the default option "Use the OpenSSL library" and click the "Next" button.

Step 8: Configure extra options

On the next screen, you will be asked to configure extra options. You can leave the default options as they are.

Click the "Next" button to proceed.

Step 9: Complete the installation

On the final screen, click the "Install" button to start the installation process.

Wait for the installation to complete. This may take several minutes, depending on your computer's speed.

Once the installation is complete, click the "Finish" button to exit the installer.

Conclusion:

Now Git is successfully installed on your computer. You can now use Git to manage your codebase and collaborate with other developers, to check you can try

Git –version on Git Bash or CMD on your local machine

How to register in Gitlab and clone a repository from your local machine

GitLab is a web-based Git repository manager that provides code collaboration, version control, and continuous integration and deployment (CI/CD) capabilities. In this documentation, we will guide you through the process of registering in GitLab, creating a new repository named "DevOps," and cloning it locally.

Prerequisites:

Before you can follow the steps below, you will need the following:

A computer with an internet connection

A web browser (such as Chrome, Firefox, or Safari)

A Git client installed on your local machine (such as Git Bash, GitHub Desktop, or Sourcetree)

Steps to register in GitLab:

Follow these steps to register in GitLab:

Step 1: Go to the GitLab website

Open your web browser and go to the GitLab website ( https://gitlab.com/).

![](file:///C:/Users/acer/AppData/Local/Temp/msohtmlclip1/01/clip_image006.jpg align="left")

Step 2: Sign up for a new account

Click the "Sign in / Register" button on the top-right corner of the page.

Select the "Register" option.

Fill out the registration form with your name, email address, and password.

Click the "Register" button to create your account.

![](file:///C:/Users/acer/AppData/Local/Temp/msohtmlclip1/01/clip_image008.jpg align="left")

Step 3: Verify your email address

GitLab will send a verification email to the email address you provided during registration.

Open your email client and look for the verification email from GitLab.

Click the verification link in the email to verify your email address.

Steps to create a new repository in GitLab:

Follow these steps to create a new repository named "DevOps" in GitLab:

Step 1: Go to your dashboard

Log in to your GitLab account.

Once logged in, you will see your GitLab dashboard.

![](file:///C:/Users/acer/AppData/Local/Temp/msohtmlclip1/01/clip_image010.jpg align="left")

Step 2: Create a new repository

Click the "New project" button on the dashboard.

Select the "Create blank project" option.

Fill out the project information form with the following details:

Project name: DevOps

Project description: A repository for DevOps scripts and configurations

Visibility level: Private (if you want to keep the repository private)

Initialize repository with a README: Checked

Click the "Create project" button to create the new repository.

![](file:///C:/Users/acer/AppData/Local/Temp/msohtmlclip1/01/clip_image012.jpg align="left")

Step 3**: Get the repository URL**

Once the repository is created, you will see the project homepage.

Click the "Clone" button to get the repository URL.

Copy the repository URL to your clipboard.

Steps to clone the repository locally:

Follow these steps to clone the "DevOps" repository locally:

Step 1: Open Git Bash

Open Git Bash on your local machine.

Step 2: Change to the directory where you want to clone the repository

Use the "cd" command to navigate to the directory where you want to clone the repository.

Step 3: Clone the local repository

Use the "git clone" command followed by the repository URL to clone the repository. For example,

git clone https://gitlab.com/your-username/devops.git

Replace "your-username" with your actual GitLab username.

![](file:///C:/Users/acer/AppData/Local/Temp/msohtmlclip1/01/clip_image016.gif align="left")

Step 4: Verify the repository is cloned

Once the clone operation is complete, you will see a new directory named "DevOps" (or whatever name you gave to the repository).

Use the "cd" command to navigate into the "DevOps" directory.

Use the "ls" command to list the files and directories in the repository.

![](file:///C:/Users/acer/AppData/Local/Temp/msohtmlclip1/01/clip_image018.gif align="left")

![](file:///C:/Users/acer/AppData/Local/Temp/msohtmlclip1/01/clip_image020.gif align="left")

You have now successfully registered in GitLab, created a new repository named "DevOps," and cloned it locally. You can now use Git to manage the repository, add new files, commit changes, and push the changes back to GitLab.