Uploaded November 2022 | Updated November 2026, 3 hours ago
Git Hooks provide a way for you to hook into your local git installation and attach additional behavior to common git actions. For example: validating that your code builds during a commit, confirming git commit messages or running your test suite before pushing your code changes to your peers. Because git hooks run on your local machine and are not checked in with the rest of your code you can also use them to automate certain parts of your workflow that might be unique to you.
Note: Git Hooks are not a replacement for a CI/CD pipeline like GitHub Actions, CircleCI etc!
You can add a new Git Hook by adding a file to the `.git/hooks` directory of your project that matches one of the supported git hooks. The supported git hooks are:
* `pre-commit`
* `prepare-commit-msg`
* `commit-msg`
* `post-commit`
* `pre-push`
* `applypatch-msg`
* `pre-applypatch`
* `post-applypatch`
* `pre-rebase`
* `post-checkout`
* `post-merge`
* `post-update`
* `pre-auto-gc`
* `post-rewrite`
You can find [more about what each of these git hooks do in the Git documentation](git-scm.com/book/en/v2/Customizing-Git-Git-Hooks). Some of these may not be helpful if your doing local development with an existing remote repo somewhere like GitHub or GitLab.
Files you change in the `.git` directory will not be checked into your git repository and therefore will not be visible to the rest of your team. If you'd like to share your pre-commit and other hooks with your team you can place the scripts somewhere inside your project and create a symlink to them in the `.git/hooks` directory.
Note: make sure that you make your Git Hooks executable or git will not be able to access and run them!
If you'd like to be able to edit `.git` files more easily inside of Visual Studio Code you'll need to disable the automatic file exclusion. You can do this by updating your `settings.json` file by adding the following setting:
```json
"files.exclude": {
"**/.git": false
},
```
This setting prevents all `.git` directories in your project - regardless of where they are located - from being hidden.
You can also bypass Git Hooks using the `--no-verify` (shorthand `-n`) argument when running git commands in your CLI. This will completely bypass these hooks and prevent them from running. If you have a Git Hook that requires tests to pass before pushing running `git push --no-verify` would allow you to push your changes for example.
Join the World of Zero Discord Server: discord.gg/hU5Kq2u
Git Hooks provide a way for you to hook into your local git installation and attach additional behavior to common git actions. For example: validating that your code builds during a commit, confirming git commit messages or running your test suite before pushing your code changes to your peers. Because git hooks run on your local machine and are not checked in with the rest of your code you can also use them to automate certain parts of your workflow that might be unique to you.
Note: Git Hooks are not a replacement for a CI/CD pipeline like GitHub Actions, CircleCI etc!
You can add a new Git Hook by adding a file to the `.git/hooks` directory of your project that matches one of the supported git hooks. The supported git hooks are:
* `pre-commit`
* `prepare-commit-msg`
* `commit-msg`
* `post-commit`
* `pre-push`
* `applypatch-msg`
* `pre-applypatch`
* `post-applypatch`
* `pre-rebase`
* `post-checkout`
* `post-merge`
* `post-update`
* `pre-auto-gc`
* `post-rewrite`
You can find [more about what each of these git hooks do in the Git documentation](git-scm.com/book/en/v2/Customizing-Git-Git-Hooks). Some of these may not be helpful if your doing local development with an existing remote repo somewhere like GitHub or GitLab.
Files you change in the `.git` directory will not be checked into your git repository and therefore will not be visible to the rest of your team. If you'd like to share your pre-commit and other hooks with your team you can place the scripts somewhere inside your project and create a symlink to them in the `.git/hooks` directory.
Note: make sure that you make your Git Hooks executable or git will not be able to access and run them!
If you'd like to be able to edit `.git` files more easily inside of Visual Studio Code you'll need to disable the automatic file exclusion. You can do this by updating your `settings.json` file by adding the following setting:
```json
"files.exclude": {
"**/.git": false
},
```
This setting prevents all `.git` directories in your project - regardless of where they are located - from being hidden.
You can also bypass Git Hooks using the `--no-verify` (shorthand `-n`) argument when running git commands in your CLI. This will completely bypass these hooks and prevent them from running. If you have a Git Hook that requires tests to pass before pushing running `git push --no-verify` would allow you to push your changes for example.
Join the World of Zero Discord Server: discord.gg/hU5Kq2u


![Sending Real-Time Messages to Unity from a Blazor Website - SignalR in Unity - Part 3
Lets complete our SignalR in Unity experiment by adding a Blazor Website to it. This will allow us to use a browser to send messages directly to Unity to create updates instead of either needing to install a Unity game or run a console app. Well quickly cover some of the components in a Blazor website as well as how some of the architecture works.
Well take a quick detour to chat about Blazor Web Assembly (Blazor WASM) vs Blazor Server because I completely forgot what project template I chose when setting up this test project. 😅
The architecture of our app looks like this:
```mermaid
graph LR
A[Browser App] ˃ B[Blazor Server]
B ˃A
B ˃ C{ASP.NET SignalR Server}
C ˃|Sends Updates to| D[Unity]
E[Console App] ˃ C
```
You can create a new Blazor project using either:
### Blazor Web Assembly
```sh
dotnet new blazorwasm
```
or
### Blazor Server
```sh
dotnet new blazorserver
```
If you want to learn more about Blazor you can get started here: https://aka.ms/getstartedwithblazor
***
If you would like to get started learning SignalR you can learn more at https://aka.ms/getstartedsignalr
My previous SignalR series shared at the [Microsoft Reactor](https://www.youtube.com/c/MicrosoftReactor1/) where we created an interactive canvas you could collaboratively draw on with the rest of the world!
1. [Building Real-Time Web Apps with SignalR](https://www.youtube.com/watch?v=k5rdhYj6TB8)
2. [Connecting a Web App to SignalR](https://www.youtube.com/watch?v=c0zmYjQ8KWA)
3. [Creating a Real-Time Web Canvas](https://www.youtube.com/watch?v=hgq1CYEJg_Q)
You can see some of the other content I have planned outside this channel in the Microsoft Reactor (and even come to our in-person events) at the [Microsoft Reactor San Francisco Meetup Page](https://www.meetup.com/Microsoft-Reactor-San-Francisco/).
***
Join the World of Zero Discord Server: https://discord.gg/hU5Kq2u Sending Real-Time Messages to Unity from a Blazor Website - SignalR in Unity - Part 3](https://i.ytimg.com/vi/6yCrnWcKvpU/mqdefault.jpg)







