Thread (141 messages) 141 messages, 8 authors, 2026-03-04

Re: Triangular workflow

From: D. Ben Knoble <hidden>
Date: 2026-01-14 02:22:45

On Tue, Jan 13, 2026 at 6:01 PM Harald Nordgren
[off-list ref] wrote:
Hi Jeff!

I'm very happy that your responded respectfully despite me basically
saying that you were using Git wrong. It's nice to see how some of the pros
do it!

I'm wondering if since you are scripting this anyway, if you really need a
push branch at all? Can't you just as easily switch to doing this in the
script:

    git config push.default upstream
    git push github jk/some-topic
The script is doing the "moral equivalent of" "git push -f github
refs/heads/jk/*", so I'm not sure I follow the suggestion here.
As a note, before I started working on this feature, I don't realize
that there was such a thing as a push branch (i.e. something different from
the tracking branch). So I had the habit of checking out and pushing like
this:

    git branch --set-upstream-to upstream/master
    git push origin $(git rev-parse --abbrev-ref HEAD)

I worked really well for me. The only issue was missing the status info
from my own branch -- which is why I started writing this feature.


Harald
My workflow is different from Peff's, but it is similar along at least
one line: it's really convenient to have "git push" with no further
arguments (only possibly flags) to push my branch to a remote mirror.

-- 
D. Ben Knoble
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help