# How To Use Git Hooks with Gitea ### Introduction The popular source code management system [Git](https://git-scm.com) is quite flexible when it comes to allowing you to perform various tasks when actions are taken on a repository. For example, you might want to send an email when a feature branch is merged into your main branch, or log various Git actions to a file for tracking. These actions are called **hooks**, and there are several that you can use for various steps along the way to perform additional work within your Git workflow. This tutorial will take a look at three such hooks to provide an overview of what is possible with this functionality. ## Prerequisites Gitea is a lightweight and flexible source code management system that will be used for the examples here, so before beginning this tutorial, you should have the following: * An Ubuntu 20.04 server with a non-root user configured with `sudo` privileges as described in the [Initial server setup for Ubuntu 20.94](https://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-20-04) tutorial. * Gitea installed on the server behind Nginx, ready to interact with using Git over SSH as described in [How To Install Gitea on Ubuntu Using Docker](https://www.digitalocean.com/community/tutorials/how-to-install-gitea-on-ubuntu-using-docker). ## Publishing a Static HTML Site When Commits are Received ### Step 1 :