Reputation: 1
I have set up a bare repository for a team to push their code to. I've noticed in order for the team to get the latest version of remote repo, I need to do git fetch branch:branch to update the bare repo. I wonder if there exists anyway that I get this command to execute whenever someone pull from my bare repo?
I have limited knowledge about this issue, but I have heard of git hooks as a way to trigger an event when a specific action takes place, so I guess I will write a script to execute above command inside an appropriate file in hooks directory, I don't know which one would it be though, or if this is a correct approach at all.
Upvotes: 0
Views: 28