---
title: "Comment by David Carr on \"Day 12 : Git and GitHub Cheatsheet\" | Hashnode"
description: "I love git switch -c branch-name often I forget to checkout a branch start building a feature then realise I&#39;m on the wrong branch. Using git switch will mo"
url: "https://hashnode.com/posts/day-12-git-and-github-cheatsheet/65130df58d76356bc61ec0dd/comment/651449765d5d746448ea4122"
---

[Discussion](https://hashnode.com/posts/day-12-git-and-github-cheatsheet/65130df58d76356bc61ec0dd)

Comment [Day 12 : Git and GitHub Cheatsheet](https://hashnode.com/posts/day-12-git-and-github-cheatsheet/65130df58d76356bc61ec0dd)

[David Carr](https://hashnode.com/@dcblogdev)

[Sep 27, 2023](https://hashnode.com/posts/day-12-git-and-github-cheatsheet/65130df58d76356bc61ec0dd/comment/651449765d5d746448ea4122)

I love `git switch -c branch-name` often I forget to checkout a branch start building a feature then realise I'm on the wrong branch.

Using

git switch will move all your changes onto a new branch, if the branch doesn't exist it will create it. Very handy!
