Recently I started having a poke around with Git Hook. The main reason for looking in to this is becuase I have a bad memory and I am always forgetting to run the unit tests before creating pushing to Github and creating a PR.
It turned out to be really easy to set up. All I needed to do was place a pre-push
file into the projects .git/hooks
folder.
1 | dotnet test ./src/project.sln |
So now when a do a push from the shell
I also use the git client built in to Visual Stuido. This also seems to respect the hooks although it doesn’t give feed back on progress.