title: Deny or Prevent history rewrite on local git repository
body: <p>I want to Deny or Prevent history rewrite on a local git repository.
  I know I can achieve this in the remote repository using:</p>
  
  <pre><code>git config --system receive.denyNonFastforwards true
  git config --system receive.denyDeletes true
  </code></pre>
  
  <p>But it only works on git server (not local repo).</p>
  
  <p>How can I disable amend and rebase on git local repo? Something like:</p>
  
  <pre><code>[core]
      repositoryformatversion = 0
      filemode = true
      bare = false
      logallrefupdates = true
      denyRebase = true &lt;--
      denyAmend = true &lt;---
  [receive]
      denyNonFastforwards = true
      denyDeletes = true
  
  </code></pre>
  
  <p>Updade: My intentions</p>
  
  <p>We develop the app that kinda like plagiarism prevention. It will record all file history at certain interval and other info during work assignments. So we can analyze with some formula on that history then decide suspected student that plagiarized. .git repo will be zipped along with assignment and send to us. Now we are re-searching the best approach to prevent any ability on history rewriting. Some of our candidate: 1. Pushing the local commit to our remote repo at certain interval 2: fork git and drop those feature.</p>
  
  <p>Thank you</p>