---
title: "ブランチから不要なコミットを削除する"
description: "ブランチから不要なコミットを削除する"
canonical: https://oozou.com/til/remove-unwanted-commit-from-your-branch-34
locale: ja
date: 2020-10-13
topic: shell
---

# ブランチから不要なコミットを削除する

> ブランチから不要なコミットを削除する

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

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

---

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

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