# Remove commit from a topic

**URL:** <https://discuss.tryton.org/t/remove-commit-from-a-topic/7236>\
**Category:** Developer\
**Created:** [April 26, 2024, 5:28am UTC](https://discuss.tryton.org/t/remove-commit-from-a-topic/7236 "2024-04-26T05:28:22Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![cheche](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/cheche/32/2488_2.png) [@cheche](https://discuss.tryton.org/u/cheche)\
**Post date:** [April 26, 2024, 5:28am UTC](https://discuss.tryton.org/t/remove-commit-from-a-topic/7236/1 "2024-04-26T05:28:22Z")

</div>

I am a bit lost with hg.  
I have create 2 topics:

topic/default/section-anchors-for-configuration-doc  
topic/default/link-email-settings-on-notification-email-docs

In the second topic there is a commit that should not be there…  
I found this instruccions:

> [@Cheat sheet of some useful hg(Mercurial) commands for Tryton/Heptapod](https://discuss.tryton.org/t/cheat-sheet-of-some-useful-hg-mercurial-commands-for-tryton-heptapod/6075):
>
> Hi, Sometimes, I forget some hg commands. Here’s a small cheat sheet with the most used hg commands to deal with Tryton/Heptapod. [Octobus](https://octobus.net/blog/2020-11-26-modern-mercurial.html)[Merge Request Quick Start Guide](https://heptapod.net/pages/quick-start-guide.html#rewriting-history)Commands Cloning Tryton Repo: hg clone ssh://hg@foss.heptapod.net/tryton/tryton Updating Tryton Repo: hg update Listing topics: hg topics Create new Topic: hg topic \<topic-name\> Switching into Topic: hg update \<topic-name\> You must rebase your topic on top of default branch. Can be done with: hg pull -u && hg update \<t…

So I realize that I should rebase before creating the second topic.  
I execute:

```auto
hg update link-email-settings-on-notification-email-docs 
hg rebase -d default

```

But still 2 commits in that topic…

---

<div class="post-metadata">

**Author:** ![cheche](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/cheche/32/2488_2.png) [@cheche](https://discuss.tryton.org/u/cheche)\
**Post date:** [April 26, 2024, 5:34am UTC](https://discuss.tryton.org/t/remove-commit-from-a-topic/7236/2 "2024-04-26T05:34:56Z")

</div>

```auto
hg stack
### topic: link-email-settings-on-notification-email-docs (2 heads)
### target: 6.8+default (branch), 1180 behind
s2: Improve notification docs adding a link to email settings
  ^ Increase version number
s1@ Improve notification docs adding a link to email settings (current)
s0^ Add section anchors to the configuration document. (base)

```

---

<div class="post-metadata">

**Author:** ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)\
**Post date:** [April 26, 2024, 6:49am UTC](https://discuss.tryton.org/t/remove-commit-from-a-topic/7236/3 "2024-04-26T06:49:59Z")

</div>

To remove a commit from a topic, you can use `hg prune -r <rev>`. Often it is needed to solve the topic with `hg evolve`.

---

<div class="post-metadata">

**Author:** ![cheche](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/cheche/32/2488_2.png) [@cheche](https://discuss.tryton.org/u/cheche)\
**Post date:** [April 26, 2024, 8:00am UTC](https://discuss.tryton.org/t/remove-commit-from-a-topic/7236/4 "2024-04-26T08:00:05Z")

</div>

> [@cheche](#):
>
> `hg update link-email-settings-on-notification-email-docs `

ok. That seems to work. I hope that I did not break anything else…

---

<div class="post-metadata">

**Author:** ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)\
**Post date:** [June 18, 2025, 8:56pm UTC](https://discuss.tryton.org/t/remove-commit-from-a-topic/7236/5 "2025-06-18T20:56:43Z")

</div>

Split this topic on June 18, 2025, 8:56pm UTC

A post was split to a new topic: [How to debug development](https://discuss.tryton.org/t/how-to-debug-development/8671)
