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

Re: git-rebase-walk

From
ACAlejandro Colomar <alx@kernel.org>
Date
Oct 1, 2026, 15:51 UTC
Message-ID
<ar5-7ZtM6C23H-8m@debian>
In-Reply-To
<ar5eereSq91xldo-@pks.im>
Hi Patrick,
Show 34 quoted lines
> Date: 2026-10-01 15:22:02+0200
> From: Patrick Steinhardt <ps@pks.im>
>
> Hi,
> 
> On Thu, Oct 01, 2026 at 01:58:42PM +0200, Alejandro Colomar wrote:
> > Hi!
> > 
> > I use this little command to apply iterative rebases, which are easier
> > to handle when there are large conflicts.  Are you interested in it?
> > 
> > 	$ cat $(which git-rebase-walk)
> > 	#!/bin/bash
> > 
> > 	set -Eeufo pipefail;
> > 
> > 	git merge-base HEAD "$1" \
> > 	| xargs -I{} git log --oneline {}.."$1" \
> > 	| cut -f1 -d' ' \
> > 	| tac \
> > 	| while read -r c; do
> > 		git rebase "$c";
> > 	done;
> > 
> > The source code is trivial, so I guess I don't need to explain much.
> > It behaves quite nicely, IME.
> > 
> > You may of course want to adapt it a little bit for merging in git(1).
> > I could help improve it a little bit.
> 
> this reminds me a bit of git-imerge [1]. What this tool does is to
> basically perform a merge between two branches incrementally using a
> matrix. The tool tries to address exactly your use case, which is to
> "present the user with one pairwise conflict at a time for resolution".

Yup, from the description, it seems to do the same thing. Thanks! I've also seen at least one other tool that does the same thing.

> Maybe that tool is interesting to you.

Not much, because I prefer a 9-line shell script that's robust as a rock vs. a 4k+ LoC python script for the same functionality. :-)

> But it's certainly fallen a bit
> out of date, as it hasn't received any updates for more than 6 years by
> now. Chances are it stll works alright though.

My script I use it in shadow-utils and in the Linux man-pages project, and is in use today. I was wondering if there was interest in integrating it to git(1). If not, I will likely provide it in the man-pages repository as a help tool (which might end up packed by distros as part of manpages-utils). Is that okay to you? (I ask mainly because it's using the git- namespace for commands, so you should at lease be aware of it.)

Have a lovely day! Alex

Show 6 quoted lines
> 
> Thanks!
> 
> Patrick
> 
> [1]: https://github.com/mhagger/git-imerge
-- 
<https://www.alejandro-colomar.es>
Previous: Patrick SteinhardtNext: Patrick Steinhardt
Message 3 of 23 in “git-rebase-walk”
  1. Alejandro ColomarOct 1, 2026
  2. Patrick SteinhardtOct 1, 2026
  3. Alejandro ColomarOct 1, 2026
  4. Patrick SteinhardtOct 2, 2026
  5. Alejandro ColomarOct 2, 2026
  6. Nico WilliamsOct 3, 2026
  7. Phillip WoodOct 4, 2026
  8. Alejandro ColomarOct 5, 2026
  9. Alejandro ColomarOct 5, 2026
  10. Phillip WoodOct 6, 2026
  11. Nico WilliamsOct 6, 2026
  12. Alejandro ColomarOct 6, 2026
  13. Alejandro ColomarOct 8, 2026
  14. Alejandro ColomarOct 8, 2026
  15. Junio C HamanoOct 1, 2026
  16. Nico WilliamsOct 1, 2026
  17. Alejandro ColomarOct 1, 2026
  18. Nico WilliamsOct 1, 2026
  19. Alejandro ColomarOct 1, 2026
  20. Nico WilliamsOct 1, 2026
  21. Nico WilliamsOct 1, 2026
  22. Simon RichterOct 2, 2026
  23. Nico WilliamsOct 2, 2026

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.