Luxart
Luxart

Reputation: 17

How do I prevent commits from being removed from github?

See title. Worst case, is there a way I can track the history of commit removals?

Upvotes: 0

Views: 235

Answers (2)

Turtuvshin
Turtuvshin

Reputation: 640

Add to Branch protection rules

Define branch protection rules to disable force pushing, prevent branches from being deleted, and optionally require status checks before merging. New to branch protection rules?

Going to your repo settings -> branches -> add rule

Configuring protected branches

Defining the mergeability of pull requests

Upvotes: 0

OrdoFlammae
OrdoFlammae

Reputation: 731

Like Tim Biegeleisen said, the best way to do this is to restrict push access to your repository, and only let people contribute to your repository through pull requests (which you can then monitor).

Upvotes: 1

Related Questions