I want to use a hook on my server in git to check my code when a push occurs.
I have my code checking solution ready to go. The problem with git's hooks is that it's hard to check out the latest code from the server's git repository when an update occurs.
How can I checkout directly from a remote repository in a latest git environment?
I found an example code on stackoverflow, but it's 6 years old. I don't know why, but commands like '--work-tree' are not available in my environment. I need another approach. Git server hooks, check if code is formated