title: How to preserve the file permission in git?
body: <p>I  encountered a problem which took me a long time to find a solution and still fail to get one.</p>
  
  <p>The problem I had is 'DatabaseError: 'attempt to write a readonly database' when I tried to deploy my website through git to a Django hosting.</p>
  
  <p>It seems like git will change the permission of my files, from 777 to 755.
  But whenever I commit my project, this change will persist. However, I still need to write something into my database (sqlite database).</p>
  
  <p>Does anyone  have a suggestion to configure my git to preserve the permission mode at each commit?</p>