git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [ANN] git-branchstack: make pull-requests without switching branches
@ 2021-10-18 19:57 Johannes Altmanninger
  2021-10-18 20:29 ` Junio C Hamano
  0 siblings, 1 reply; 3+ messages in thread
From: Johannes Altmanninger @ 2021-10-18 19:57 UTC (permalink / raw)
  To: git

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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [ANN] git-branchstack: make pull-requests without switching branches
  2021-10-18 19:57 [ANN] git-branchstack: make pull-requests without switching branches Johannes Altmanninger
@ 2021-10-18 20:29 ` Junio C Hamano
  2021-10-18 21:04   ` Johannes Altmanninger
  0 siblings, 1 reply; 3+ messages in thread
From: Junio C Hamano @ 2021-10-18 20:29 UTC (permalink / raw)
  To: Johannes Altmanninger; +Cc: git

Johannes Altmanninger <aclopte@gmail.com> writes:

> I wonder if there are more use cases for creating/updating commits that are
> not on the current branch.

I think the canonical answer to that question is "git worktree add"?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [ANN] git-branchstack: make pull-requests without switching branches
  2021-10-18 20:29 ` Junio C Hamano
@ 2021-10-18 21:04   ` Johannes Altmanninger
  0 siblings, 0 replies; 3+ messages in thread
From: Johannes Altmanninger @ 2021-10-18 21:04 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

On Mon, Oct 18, 2021 at 01:29:10PM -0700, Junio C Hamano wrote:
> Johannes Altmanninger <aclopte@gmail.com> writes:
> 
> > I wonder if there are more use cases for creating/updating commits that are
> > not on the current branch.
> 
> I think the canonical answer to that question is "git worktree add"?

True. Cherry-picking a bunch of commits can be much slower than just
creating the commit objects but I don't think that's a problem.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-10-18 21:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-18 19:57 [ANN] git-branchstack: make pull-requests without switching branches Johannes Altmanninger
2021-10-18 20:29 ` Junio C Hamano
2021-10-18 21:04   ` Johannes Altmanninger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).