# Git Fundamentals Documentation

### Step 1: Search on how to install git on your machine and check git version

```plaintext
git --version
```

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1724560118571/ae35c82b-afc0-42a8-ac22-9c973bbb84bf.png align="center")

### Step 2: Configure git

```plaintext
git config --global user.name "Github Username"
git config --global user.email "your.email@example.com"
```

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1724562479773/0dd34b38-97ec-4de7-8148-f41e04cb9403.png align="center")

Check if changes reflected using:

```plaintext
git config --list
```

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1724562522117/5f47628e-06ca-4b6f-86ad-52183e1df514.png align="left")

### Step 3: **Initialize a Git Repository**

```plaintext
git init
```

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1724562757028/e2d7a1b8-d9eb-4366-8937-741dd2e5f33b.png align="center")

### Step 4: **Add Files to the Repository**

```plaintext
git add .
```

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1724564189274/d85594b6-d231-4bcd-9da9-31c4ebf4f8e7.png align="center")

### Step 5: Check the status

```plaintext
git status
```

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1724564253600/79295e4d-e5a4-45d6-97b7-d9cc66e23552.png align="center")

### **Step 6: Commit Changes**

```plaintext
git commit -m "initial commit"
```

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1724564319843/eb93d902-6372-4af4-b27e-3f36ba3b20ff.png align="center")

### **Step 7: View Commit History**

```plaintext
git log
```

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1724564355219/9af4aef1-934e-4758-b772-de3b6d806df6.png align="center")
