git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[filter-repo] How to reorder commits

From
Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Date
Jul 21, 2022, 15:19 UTC
Message-ID
<20220721151937.adgufwkj3uxkk3yb@meerkat.local>
Elijah:

It seems filter-repo can be used to easily reorder commits, but I'm not able to quite figure out how to do it with callbacks. My goal is:

- keep the cover letter at the start of the series in order to cleanly
  delineate where their work starts (and thus avoid potential problems with
  rebases and finding fork-points with base branches, which tends to give
  newbies trouble)
- when the author is ready to submit their work, move the cover letter to the
  tip of the branch and tag it as "foo-bar-v1"
- when the author is ready to work on their changes, they run --reroll and we
  move the cover letter back to the start of the series, adding any necessary
  template "changes in vX" entries to it
(or maybe it will go completely differently -- it's all very fluid right now)

Basically, is git-filter-repo the right tool to reorder commits, or is it best to go directly with fast-export/fast-import?

Thanks in advance, Konstantin

Next: Elijah Newren
Message 1 of 3 in “[filter-repo] How to reorder commits”
  1. Konstantin RyabitsevJul 21, 2022
  2. Elijah NewrenJul 22, 2022
  3. Konstantin RyabitsevJul 25, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.