Git Auto Commit Message
This is an automation tool to generate Git commit messages based on the conventional rule from staged diff changes. It uses deepseek-coder-1.3b-instruct model.
- Clone this repository:
git clone https://github.com/RifqiAnshari/git-auto-commit.git cd git-auto-commit
- Set up the virtual environment:
python -m venv venv venv\Scripts\activate # On Windows # source venv/bin/activate # On macOS/Linux
- Install the required dependencies:
pip install -r requirements.txt
- Run the script with Python (recommended: Python 3.8+):
python main.py
To use the custom Git alias for this script, follow these steps:
-
Change git_acm.ps1 file with your actual file path.
-
Enter this command to your terminal (powershell):
git config --global alias.acm '!powershell -ExecutionPolicy Bypass -File "<absolute path of .ps1 file>"'
-
This alias will allows you to run the script using:
git acm
- Automatically fetches staged Git changes and generates a commit message.
- The generated commit message follows by the conventional commit types defined in the configuration.
- Once confirmed, the script commits the changes with the generated message.
Made with ❤️!