Giter Site home page Giter Site logo

check-leaks's Introduction

Pre-Commit Installation Script

This script automates the installation, uninstallation, cleanup, and updating of pre-commit hooks in your Git repositories.

Pre-commit hooks help ensure that your commits meet certain standards and protect against secret leakages.

Usage

Prerequisites

  • Python must be installed on your system.

Installation

1. Download and Run Script

You can download and run the script directly using curl. Execute the following command in your terminal:

curl -fsSL https://raw.githubusercontent.com/Andygol/check-leaks/main/pre-commit.sh | sh -s install

This will download and run the script with the install command.

Alternatively, you can download the script and make it executable manually:

curl -O https://raw.githubusercontent.com/Andygol/check-leaks/main/pre-commit.sh

2. Make the script executable

chmod +x pre-commit.sh

Commands

1. Install

Run the following command to set up pre-commit hooks for your repository:

./pre-commit.sh install

This will create a virtual environment, install pre-commit, configure hooks including one for detecting secrets, and run pre-commit.

2. Uninstall

To remove pre-commit from your repository, use the following command:

./pre-commit.sh uninstall

This will uninstall pre-commit and leave your repository without any hooks.

3. Cleanup

If you want to remove the virtual environment and configuration files, run:

./pre-commit.sh cleanup

Do note that this will not remove the hooks from your repository. Use the uninstall command to remove them. You can combine uninstall and cleanup to remove the hooks and the virtual environment.

./pre-commit.sh uninstall cleanup
curl -fsSL https://raw.githubusercontent.com/Andygol/check-leaks/main/pre-commit.sh | sh -s uninstall cleanup

4. Update

To update your pre-commit hooks to the latest versions, use:

./pre-commit.sh update

This will automatically update the hooks using pre-commit autoupdate.

Additional Information

  • This script assumes that you have Python installed on your system.
  • For more details on pre-commit, visit the official documentation.

Feel free to customize the script based on your needs.


Note: Always review scripts before running them, and use them at your own risk.

License

This script is licensed under the MIT License. See the LICENSE file for details.

Author

This script was created by Andrii Holovin (Andygol).

check-leaks's People

Contributors

andygol avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.