---
title: "Comment by Akcr on \"Git Commands\" | Hashnode"
description: "git checkout -b &lt;branch_name&gt; is used to create a new branch in a Git repository and switch to that branch in a single step."
url: "https://hashnode.com/posts/git-commands/6424728242c98a158831ec49/comment/654b2508dea030f4dec0b270"
---

[Discussion](https://hashnode.com/posts/git-commands/6424728242c98a158831ec49)

Comment [Git Commands](https://hashnode.com/posts/git-commands/6424728242c98a158831ec49)

[Akcr](https://hashnode.com/@akcr684)

[Nov 8, 2023](https://hashnode.com/posts/git-commands/6424728242c98a158831ec49/comment/654b2508dea030f4dec0b270)

git checkout -b <branch\_name>

is used to create a new branch in a Git repository and switch to that branch in a single step.

[Suresh Sala](https://hashnode.com/@SureshSala)

[Nov 27, 2023](https://hashnode.com/posts/git-commands/6424728242c98a158831ec49/comment/654b2508dea030f4dec0b270#reply-6564a9bab4e3eb72c581f494)

[Akcr](https://hashnode.com/@akcr684) Updated the content. Thank you
