From: Artur Bieniek Date: Mon, 24 Aug 2026 10:55:08 GMT Subject: Re: [PATCH] pull: add --hard mode Message-ID: <248fc3ca-7907-4720-ab71-1cf5926b82a0@antmicro.com> In-Reply-To: On 8/20/26 7:29 PM, Kristoffer Haugsbakk wrote: > On Thu, Aug 20, 2026, at 18:43, Artur Bieniek wrote: >> One case where --ff-only does not seem to cover that audience is when >> the upstream branch itself is rewritten. >> >> For example, a checkout may contain no local development at all and only >> be used to track the latest state of an upstream branch, but if that >> branch is rebased or otherwise force-updated, git pull --ff-only will >> refuse to update it because the histories have diverged. > > I don’t understand what you need a branch for in that case. I just use > the remote-tracking branch in that case (`origin/main` e.g.). > > PS: Bottom posting is strongly preferred on this list. > >> ... The branch itself is not essential; the point is to update the checked-out working tree as well. git fetch updates origin/main, but leaves the checkout at the old commit. If resetting does not belong under pull, would the inverse design be more appropriate, e.g. git reset --pull --hard, meaning “fetch the configured upstream and reset to it”? Or would making reset perform network I/O be undesirable for the same reason? Thanks, Artur