# Day 8 : Basic Git & GitHub for DevOps Engineers

Today, We have some theory and basic tasks for git. let's start with tasks.

1) Install Git on your computer:

To install git on Ubuntu you just need to run the following command.

```bash
sudo apt install git
```

and it will start installing git on your system like this.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1683248533294/eebf3497-7538-4841-b749-fc78b1581faf.png align="center")

you can check git version by typing  

```bash
git --version
```

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1683248621007/c8e2d884-053b-4499-9aa8-41204a3de98f.png align="center")

1. Create a new repository on GitHub and clone it to your local machine
    

To create a new repository, On the GitHub homepage, click on the "+" button in the top-right corner and select "New repository" from the dropdown menu.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1683248893527/9cd5164f-d648-4c5d-ba38-1e44edfa43b6.png align="center")

1. In the "Repository name" field, enter a name for your repository. You can also provide an optional description to give others a brief idea about your project.
    
2. Choose whether you want the repository to be public (visible to everyone) or private (accessible only to you and collaborators).
    

To clone it on a local machine you can just run the following command.

```bash
git clone url
```

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1683249037222/eeb50cb0-8737-4b5c-aef9-4ffbfd2b9414.png align="center")

1. Make some changes to a file in the repository and commit them to the repository using Git
    

you can create file in your folder then you can commit them by following command.

```bash
git add .
git commit -m "first commit"
git push -u origin main
```

you will see message like below.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1683249220628/c585136d-8eb2-4c41-bd9f-891bdb5de704.png align="center")

That was all for today's challenge. It was quite easy. If you have any suggestion/questions please comment below. Looking forward to next challenge.

Happy Learning.
