Skip to content

jumpfast-tech/restrict-commit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Restrict Commit Hook

This repository contains a Git pre-commit hook designed to prevent commits on branches that have already been merged. Once a branch is marked as merged, this hook will block any further commits to ensure a clean and organized Git history, reducing potential conflicts and confusion in collaborative projects.

Installation Instruction

To install the restrict commit hook in your local Git repository, follow these steps:

Install GitHub Workflow

# Download the workflow from the restrict-commit repository
mkdir -p .github/workflows
curl -o .github/workflows/restrict-commits.yml https://raw.githubusercontent.com/jumpfast-tech/restrict-commit/main/.github/workflows/restrict-commits.yml

Install Hook

# Download the hook script from the restrict-commit repository
mkdir -p .git/hooks
curl -o .git/hooks/pre-commit https://raw.githubusercontent.com/jumpfast-tech/restrict-commit/main/hooks/pre-commit

# Make the hook executable
chmod +x .git/hooks/pre-commit

This will add the pre-commit hook to your Git repository, automatically running it before each commit to ensure no changes are made to already merged branches.

Support

For any issues, questions, or feedback regarding the restrict commit hook, please contact our development team at [email protected]

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages