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

[ANN] git-branchstack: make pull-requests without switching branches

From
Johannes Altmanninger <aclopte@gmail.com>
Date
Oct 18, 2021, 19:57 UTC
Message-ID
<20211018195755.pcdpx6xyjeawttyu@gmail.com>

I like to keep all in-flight commits in a single local branch, so I can test them in combination and update them easily. git-branchstack allows me to send select commits upstream as pull requests (for projects that don't accept patches). By never touching the worktree, it avoids invalidating builds. See

	https://github.com/krobelus/git-branchstack

To implement this I needed a way to reword (change the commit message) and reparent commits. I used the "rebase" function from [git revise](https://git-revise.readthedocs.io/). Unlike "git merge-tree" this can change commit messages, and allows me to resolve conflicts using a temporary file. I didn't find another easy way to do this (without touching my worktree/index). Is there a plumbing command I can use to create a copy of a commit, but with a different commit message?

I wonder if there are more use cases for creating/updating commits that are not on the current branch. Future "git rebase -i" should only update worktree files when needed (see the "TODO:" comments in sequencer.c). Rewording never needs that, so it could, in theory, work on branches that are not checked out, though that would complicate the rebase UI even more.

Next: Junio C Hamano
Message 1 of 3 in “[ANN] git-branchstack: make pull-requests without switching branches”
  1. Johannes AltmanningerOct 18, 2021
  2. Junio C HamanoOct 18, 2021
  3. Johannes AltmanningerOct 18, 2021

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.