Skip to main content

A small utility to configure global Git settings interactively or via CLI.

Project description

Git Configurator ⚙️✨

GitHub Sponsors Patreon Buy Me a Coffee PayPal

Git Configurator is a Python-based utility that simplifies setting up your global Git configuration. It interactively guides you through selecting merge strategies, setting author details (including website), and choosing your commit signing preferences. Alternatively, you can configure everything via command-line arguments for automated setup.

Features 🚀

  • Interactive Setup:
    Follow step-by-step prompts to configure merge options, author name/email, website, and GPG signing settings.
  • Non-Interactive Mode:
    Use command-line arguments for quick, automated configuration.
  • Global Git Configuration:
    Easily set up your Git environment with a single command.
  • Integration with Kevin's Package-Manager:
    Installable via Kevin's Package-Manager under the alias gitconfig for global access.

Installation 📦

You can run the script directly:

python3 main.py --interactive

Or, if you have Kevin Package-Manager installed, install Git Configurator with:

pkgmgr install git-configurator

Then, use it globally via:

gitconfig --help

Usage 💻

  • Interactive Mode:

    gitconfig --interactive
    

    Follow the on-screen prompts to set your Git configuration.

  • Non-Interactive Mode:

    gitconfig --merge-option rebase --name "John Doe" --email "john@example.com" --website "https://johndoe.com" --signing gpg --gpg-key YOUR_GPG_KEY
    

🔑 Using Your GPG Key with Git Configurator

To sign your Git commits with a GPG key, you must first identify your key ID. Follow these steps to find your GPG key ID:

1. List your available GPG keys:

gpg --list-secret-keys --keyid-format LONG

You will see output similar to:

/home/youruser/.gnupg/pubring.kbx
--------------------------------------------
sec   rsa4096/A1B2C3D4E5F6G7H8 2020-12-29 [SC]
      1234ABCD5678EFGH9012IJKL3456MNOP7890QRST
uid                 [ultimate] John Doe <john@example.com>
ssb   rsa4096/Z9Y8X7W6V5U4T3S2 2020-12-29 [E]

The GPG key ID you need for Git configuration is the short form displayed after rsa4096/, in this example:

A1B2C3D4E5F6G7H8

2. Configure your GPG key with Git Configurator:

gitconfig --signing gpg --gpg-key R5T6Y7U8I9O0P1Q2

Replace R5T6Y7U8I9O0P1Q2 with your actual key ID from the output above.

License 📄

This project is licensed under the MIT License.

Author 👤

Kevin Veen-Birkenbach
veen.world

Acknowledgements 🤖💡

This script was created with the help of ChatGPT.


Happy configuring! 🎉

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gitcon-1.0.0.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gitcon-1.0.0-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file gitcon-1.0.0.tar.gz.

File metadata

  • Download URL: gitcon-1.0.0.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for gitcon-1.0.0.tar.gz
Algorithm Hash digest
SHA256 38ca6e4061efdae5b91295efd9b5ac048b73e678b8079510e4fb38916ebc0706
MD5 b18710afe1691e1bc3e1ec3af1be4567
BLAKE2b-256 1b272511c2ef6ebf28aba3f9b262d5bc1a3c2b3929b58b0a34d79207a8a611e8

See more details on using hashes here.

Provenance

The following attestation bundles were made for gitcon-1.0.0.tar.gz:

Publisher: publish-pypi.yml on kevinveenbirkenbach/git-configurator

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gitcon-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: gitcon-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for gitcon-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2c5cb147e5c2790fd6cf50946808c65c42719c077518b0310cbc764157ed29f0
MD5 63a4d7e2eadeb60c7501051c80c06529
BLAKE2b-256 5f5b0a4d473ae21b796ec74839bd9e9813d470ab256e50f0d4e0e3a192d1ffbc

See more details on using hashes here.

Provenance

The following attestation bundles were made for gitcon-1.0.0-py3-none-any.whl:

Publisher: publish-pypi.yml on kevinveenbirkenbach/git-configurator

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page