How do I rebase a chain of local git branches?

2022: I described last August in “Git interactive rebase: how to move other branches (refs) automatically?” a new rebase option –update-ref (Git 2.38, Q3 2022): Automatically force-update any branches that point to commits that are being rebased. Any branches that are checked out in a worktree are not updated in this way. branch1 branch2 | … Read more

Git interactive rebase without opening the editor

TL;DR answer: GIT_SEQUENCE_EDITOR=: git rebase -i HEAD~3 You can’t stop git rebase –interactive from running the “sequence editor” (that’s the edit command on the “sequence file” containing the various pick, etc., commands). However, if you examine the interactive rebase script: $ vim $(git –exec-path)/git-rebase–interactive you’ll find code like this near line 230 or so: git_sequence_editor … Read more