We are using pre-receive hook. We need to know about the user name of who are going to commit the files. Is there any Git commands for related to this. Could you share your suggestion ?
I have tried as below mentioned Gitlab command. It can able to find the user name of last commit only. But in our case we are need to know about the user name before going to commit the files.
- git log -1 --pretty=format:%an 2) git show -s --pretty=format:%an