If the code warehouse on your server is only used as a code warehouse, that is, it is the same as the SVN warehouse, then you should use:
git init --bare
to initialize. The warehouse created in this way does not contain a working directory, so there is no need to use a hook to reset.
But if your server is also a production environment and you want the code to be automatically deployed every time you push it, you will inevitably need to clone a working directory on the server and use a hook to automatically synchronize the working directory after each push. .
If the code warehouse on your server is only used as a code warehouse, that is, it is the same as the SVN warehouse, then you should use:
to initialize. The warehouse created in this way does not contain a working directory, so there is no need to use a hook to reset.
But if your server is also a production environment and you want the code to be automatically deployed every time you push it, you will inevitably need to clone a working directory on the server and use a hook to automatically synchronize the working directory after each push. .
How to execute git reset --hard on server hook?