Hooking the Test into Git: Working of Git
Get to know how to hook a test into Git.
We'll cover the following...
Create scripts
Let’s make two simple scripts to show how git hooks work. The first one will be named .git/hooks/pre-commit
. Do not include the .sample
suffix or any other suffix. In the file, add these lines:
#!/usr/bin/env python
print('Hello from pre-commit')
Make a similar file with a different string and save it as .git/hooks/pre-push
. Then make the files executable by entering the following command in the ...