I am currently using git post-receive hook to push my code to server.In the future I am planning to deploy another project in this server. So there will be 2 projects locally and each of them will be a separate git repository. How can I transform post-receive so when i push from dir1 it will push code to dir1 directory, and when i push from dir2 it will push code to dir2 directory.
Until now i have a simple line which gets the pushes i make and send them to the folder directory.