proper way to disable force push? #3158

Closed
opened 2025-11-02 05:02:18 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @erpadmin on GitHub (Apr 8, 2019).

Is this the proper way to global disable force pushing for gitea?

git config --system receive.denyNonFastForwards true
Originally created by @erpadmin on GitHub (Apr 8, 2019). Is this the proper way to global disable force pushing for gitea? ``` git config --system receive.denyNonFastForwards true ```
GiteaMirror added the type/question label 2025-11-02 05:02:18 -06:00
Author
Owner

@lafriks commented on GitHub (Apr 8, 2019):

That will disable force push on client side. To disable in gitea you need to use branch protection

@lafriks commented on GitHub (Apr 8, 2019): That will disable force push on client side. To disable in gitea you need to use branch protection
Author
Owner

@erpadmin commented on GitHub (Apr 10, 2019):

The current design is not clear.

Enable Branch Protection description is "Prevent deletion and disable Git force pushing to the branch." In practice this option requires that Enable Push Whitelist is enabled and users are added in order to do a fast-forward push.

Should the description be updated? Or an independent option to specifically disable force pushing only be added?

@erpadmin commented on GitHub (Apr 10, 2019): The current design is not clear. Enable Branch Protection description is "Prevent deletion and disable Git force pushing to the branch." In practice this option requires that Enable Push Whitelist is enabled and users are added in order to do a fast-forward push. Should the description be updated? Or an independent option to specifically disable force pushing only be added?
Author
Owner

@lunny commented on GitHub (Apr 11, 2019):

@erpadmin Please send a PR to fix that doc.

@lunny commented on GitHub (Apr 11, 2019): @erpadmin Please send a PR to fix that doc.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#3158