title: Git: How to re-stage the staged files in a pre-commit hook
body: <p>I'm writting a git pre-commit hook.<br>
  The script could reformat some code, so it could modify the staged files. </p>
  
  <p>How can I re-stage all files that are already staged ?</p>