Sanity testing is  basically the subset of the regression testing which is performed to ensure that code changes that  are made by the Development team are working on the system. The focus of the team during sanity testing process is to validate the functionality of the application and not in  detailed testing of each and every component. We have pre commit in the Git provided by Git repository which is also known as hook,  basically  it gets triggered just  before the commit happens. We can write a script by making use of this hook to implement the smoke testing. The script can be used to  perform the sanity checks on the changes that are newly added and   committed into the repository. Below is the sample script which is checking if any .py files which are to be committed are properly formatted with the  use of the python formatting tool pyfmt (auto formatting source code tool in python). In case  the files are not properly formatted, then the script prevents the changes to be committed to the repository by exiting with status 1