Code Monkey home page Code Monkey logo

gitshit's Introduction

GitShit

Description

"GitShit" is a straightforward Python script designed to identify and modify author names and emails in git commits. It scans for specified unwanted keywords within commit author details and replaces them with user-defined values.

Setup and Installation

Compatibility Note

While "GitShit" has only been tested on Pop!_OS, a Debian-based distribution, its reliance on Python and Bash suggests it could also be compatible with non-Debian based Linux distributions. However, this broader compatibility has not been explicitly verified.

Prerequisites

  • Python 3.x
  • Git

Installation Steps

  1. Clone the Repository Clone the GitShit repository to your local machine:

    git clone https://github.com/ZribeDev/GitShit
    cd GitShit
  2. Create and Configure the Environment File

    • Rename .env.example to .env:
      mv .env.example .env
    • Edit the .env file with your specific details:
      • GITHUB_USERNAME: Your GitHub username.
      • GITHUB_TOKEN: Your personal GitHub token.
      • UNWANTED_KEYWORDS: Comma-separated list of unwanted keywords.
      • NEW_NAME: New name for replacing in commits.
      • NEW_EMAIL: New email for replacing in commits.
      • CHANGE_EMAILS: Set to True to enable email modifications.
  3. Generate a GitHub Token

    • Navigate to GitHub Tokens to generate a new token with necessary permissions.
    • Important: Ensure that the token has the repo permission, which provides all repository permissions. This is crucial for the script to function correctly as it needs to access and modify repository data.
    • Place this token in the GITHUB_TOKEN field in your .env file.
  4. Install Dependencies

    • Install the required Python modules using pip:
      pip install -r requirements.txt
  5. Prepare the Execution Script

    • Make the start.sh script executable:
      chmod +x start.sh

Usage

  • To execute the script once:

    python main.py
  • To run the script multiple times, use:

    bash start.sh [amount]

    Replace [amount] with the number of times you want to run the script. If [amount] is not specified, the script will run once by default.

Contributing

Feel free to fork the repository and submit pull requests with your contributions.

License

This project is open-sourced under the MIT License.

gitshit's People

Contributors

zribedev avatar

Stargazers

 avatar  avatar  avatar  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.