File size: 212 Bytes
9470652
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
#!/bin/bash

branch=$(git rev-parse --abbrev-ref HEAD)

if [ "$branch" = "main" ]; then
    echo "\nERROR: Direct pushes to the 'main' branch are not allowed. Please create a PR for your changes."
    exit 1
fi