Git: receive.denyCurrentBranch=updateInstead does not update
The receive.denyCurrentBranch=updateInstead
option (set on the server repo) should, according to the docs, allow the push and do a hard reset of the worktree if it's clean, or just flat out refuse the push if the worktree isn't clean.
Instead, for me it allows the push, but doesn't touch the worktree - I have to git checkout -f
after each push anyway, even though it's cleanish (has just untracked files present, which, if I'm not mistaken, should still count as clean).
Edit: The push-to-checkout
hook doesn't seem to run, either, even though it's in the .git/hooks/push-to-checkout file all right, with +x rights as needed. I made it output some lines and exit with code 1, so it should abort after producing the output - and yet the pushes come through.
My client is 2.31.0.windows.1 (TortoiseGit), server is 2.39.1 if that one matters.
Comments
Post a Comment