# Move commits to a new branch

> If you want your current commits to be moved to a new branch then run the following command on the terminal:

- Canonical: https://preview.arshadmehmood.com/today-i-learned/git/move-commits-to-a-new-branch/
- Section: git
- Author: Arshad Mehmood

If you want your current commits to be moved to a new branch then run the following command on the terminal:

```
$ git branch feature
$ git reset --hard HEAD~1
```

