---
title: "Discussion on \"Git Commands\" | Hashnode"
description: "Discussion on \"Git Commands\". Learn by practice"
url: "https://hashnode.com/posts/git-commands/6424728242c98a158831ec49"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Git Commands](https://sureshsala.hashnode.dev/git-commands?utm_source=hashnode&utm_medium=feed)

Learn by practice

Mar 29, 2023 · 2 min read · sureshsala.hashnode.dev  
Updated Nov 2  
Read the article

## Written by

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

@SureshSala · Bangalore, India

  
[View profile](https://hashnode.com/@SureshSala)

Mobile application developer.

Mobile Application developer.

## Responses 1

Markdown supported · ⌘↵ to post

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

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

git branch -m <old-branch-name> <new-branch-name>

The git branch -m command is used to rename a branch in Git

[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
