---
title: "Remove unwanted commit from your branch"
description: "Remove unwanted commit from your branch"
canonical: https://oozou.com/til/remove-unwanted-commit-from-your-branch-34
locale: en
date: 2020-10-13
topic: shell
---

# Remove unwanted commit from your branch

> Remove unwanted commit from your branch

Published: 2020-10-13 · Topic: [shell](https://oozou.com/til-topics/shell) ([markdown](https://oozou.com/til-topics/shell.md))

```bash
git rebase -p --onto SHA^ SHA
```

---

Contact OOZOU: hello@oozou.com · +66 2544 0000 · https://oozou.com/contact

More for AI agents: https://oozou.com/llms.txt · every page has a markdown twin at its URL plus ".md"
