Git development
 help / color / mirror / Atom feed
From: Johannes Altmanninger <aclopte@gmail.com>
To: git@vger.kernel.org
Subject: [ANN] git-branchstack: make pull-requests without switching branches
Date: Mon, 18 Oct 2021 21:57:55 +0200	[thread overview]
Message-ID: <20211018195755.pcdpx6xyjeawttyu@gmail.com> (raw)

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.

             reply	other threads:[~2021-10-18 19:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-18 19:57 Johannes Altmanninger [this message]
2021-10-18 20:29 ` [ANN] git-branchstack: make pull-requests without switching branches Junio C Hamano
2021-10-18 21:04   ` Johannes Altmanninger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211018195755.pcdpx6xyjeawttyu@gmail.com \
    --to=aclopte@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox