# Efficient Ways to Check Your Current Git Branch in the Terminal

---

## Github branch

In Git, a branch is a lightweight movable pointer to a commit. It is essentially a label that points to a specific commit in the Git repository's commit history.

When you create a new branch, it allows you to diverge from the main line of development and make changes without affecting the main branch.

---

### Git status

When you run `git status`, Git displays the name of the current branch in the output.

```ruby
git status
```

Look for the line that says "On branch &lt;branch\_name&gt;".

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1715192958696/2bea0372-5fac-498a-b41c-e3acd95b5f72.png align="center")

---

### Git branch

Running `git branch` will list all local branches, with the current branch highlighted with an asterisk (`*`).

```ruby
git branch
```

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1715633217173/add4fba0-03fb-4b32-9d90-62d1479aea75.png align="center")

---

### Show current

When using the `git branch --show-current` command, you directly display the name of the current branch.

```ruby
git branch --show-current
```

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1715633300304/e6e3f52d-015a-4c1b-95d6-bf386710812b.png align="center")

---

## **Done**

---

### Conclusion

By following these steps, you can easily visualize your current git branch.

---

### **Celebrate**

![The It Crowd Birthday GIFs | Tenor](https://media.tenor.com/kDyYq4PQuIgAAAAC/clapping-it-crowd.gif align="left")

---

### **Reach me out**

* [**Github**](https://github.com/alexcalaca)
    
* [**LinkedIn**](https://linkedin.com/in/alexandrecalacaofficial)
    
* [**Hashnode**](https://hashnode.com/onboard?next=/@alexandrecalaca)
    
* [**Youtube**](https://www.youtube.com/@alexandrecalacaofficial)
    

---

### Final thoughts

Thank you for reading this article.

If you have any questions, thoughts, suggestions, or corrections, please share them with us.

We appreciate your feedback and look forward to hearing from you.

Feel free to suggest topics for future blog articles. Until next time!

---
