From: D. Ben Knoble Date: Sun, 28 Sep 2025 21:38:52 GMT Subject: Re: [PATCH v3 4/4] doc: git-push: clarify "what to push" Message-ID: In-Reply-To: On Fri, Sep 26, 2025 at 7:07 PM Junio C Hamano wrote: > > "Julia Evans" writes: > > My best guess from my experimentation and from reading some > > of the commit messages/code is that the rules for how > > `push.default=simple` works are something like: > > > > 1. If the remote you're pushing to is the remote that `git pull` > > would normally pull from if run without any arguments, > > then require the user to set an upstream > > (with the idea that the remote is somehow "special" > > and should be protected from accidental pushes) > > This is the traditional 'simple' > > > > 2. Otherwise, push to the branch to with the same name > > without requiring an upstream to be set > > This is what 'triangular' feature we saw earlier in the "git log" > output in my message you are responding to had a few commits for. > > > That said, the exact details of how push.default=simple works > > (ironically) seem complicated enough that I don't think it's worth > > documenting in detail at the beginning of the `git push` man page. > > Totally agreed. Seconded: Julia and I spent quite a bit of time in Discord trying to piece this puzzle back together [1], and while I don't think we found _all_ the commits you listed, we found most of them. My summary was > I think the logic is: > > - pushing to the same remote you pull from? Only if @{upstream} is set (?? and maybe something about branch name matching, i don't remember), > - pushing somewhere else? Pushes to destination=same name [1]: https://discord.com/channels/1042895022950994071/1412969828066787462 Getting a clear picture _somewhere_ of this default would probably be nice. -- D. Ben Knoble