|
|
|
|
|
by crbnw00ts
4595 days ago
|
|
You can already do this with git config, but unfortunately it's a giant hammer that affects the entire repo at once. It is of course possible to write a post-receive hook that denies non-fastforward pushes to specific branches, but really, git should include a config option out of the box to do this at a more granular level. A common workflow is the expectation that people should be able force-push to their own topic branches all they like, but never to the default branch (except in extreme circumstances). Being able to easily set this via a config option would be very helpful in keeping working repos more "safe" from this kind of thing. |
|