# 10 Git command every developer should know

### Introduction

I'm assuming you just finish learning JavaScript, or you're a developer with years of experience looking to master some of the popular git commands

In this blog, I discussed 10 basic git commands every developer should know either beginner or pro

Follow me while I hold your hands.

### Git Init

`git init`, Git makes another branch, which is an information structure that will store all the version control-related data for your project . This incorporates following changes, overseeing branches, and putting away commit history.

```powershell
git init
```

### Git Status

At the point when you run `git status`, Git gives you data about which documents have been changed, which records are organized for the following commit, and which documents are not being tracked.

```powershell
git status
```

### Git Clone

`git clone` order permits you to get every one of the records, commit history, branches, and other various control data from a remote repository making it open for you to deal with locally on your computer.

```powershell
git clone <repository_url>
```

### Git Add

`git add` is a Git order used to organize changes in your working directory, setting them up to be remembered for the following commit.

```powershell
git add <filename>
```

### Git Pull

`git pull` is a Git command used to get and merge changes from a remote repository into your ongoing local branch.

```powershell
git pull origin <branch_name>
```

### Git Commit

`git commit` is a Git command used to save your organized changes as a new commit in the Git storehouse's set of experiences.

```powershell
git commit -m "Add new commit"
```

### Git Branch

`git branch` addresses a free line of improvement, permitting you to work on different features, bug fixes, or tests without influencing the fundamental codebase.

```powershell
git branch new-feature
```

### Git Log

By default, `git log` shows the commits for the current branch. `git log` provide detailed information about each commit, permitting you to follow changes, figure out the improvement course of events, and survey commit messages.

```powershell
git log
```

Here's a sample output of `git log`

```powershell
commit c31bdfa09a2c94d74f67c91a4992c2e3d35a4f25
```

### Git Diff

`git diff` is a Git command used to show the difference between various stages of your repository

```powershell
git diff --staged
```

### Git Push Origin

git push origin is a Git command used to upload your local commits to a remote repository.

```powershell
git diff --staged
```

### Conclusion

Thank you for reading to the end. Hope this article was helpful.

Note: This list is not in any order.

Thank you reading to the end❤️
