Skip to main content

Gitignore Maker

A powerful command-line tool for managing .gitignore files with language-specific templates and size-based filtering. This tool allows you to create and update .gitignore files based on your project's programming languages, while also filtering out large files and folders exceeding a user-defined size limit.

Introduction

Managing a clean and comprehensive .gitignore file is crucial for ensuring that unnecessary files are excluded from your Git repositories. This CLI tool simplifies that process by allowing you to:

  • Automatically generate .gitignore content based on your project's programming languages.
  • Filter files and folders by size, ensuring that large assets are ignored.
  • Exclude specific files and folders from being added to .gitignore.

With just a few commands, you can maintain an optimized and language-specific .gitignore file tailored to your project's needs.

Key Features

  • Language-Specific .gitignore Templates: Generate .gitignore content based on the programming languages used in your project.
  • Size-Based File Exclusion: Automatically add files and folders to .gitignore if they exceed a specified size limit.
  • Custom Folder and File Exclusion: Specify folders and files to ignore during size-based filtering.
  • Seamless Integration: The tool can be easily integrated into your project management workflow, automating the generation and update of .gitignore.

Installation

Install the libray:

pip install gitignore-maker

Usage

Run the CLI tool by specifying your desired options.

gitignore_maker [OPTIONS]

Options

Option Description
--languages Specify the programming languages to include in the .gitignore. Example: --languages Python Node.
--size-limit Set a size limit for files (in bytes). Files larger than this limit will be added to .gitignore. Default is 49 MB.
--ignore-folders Specify folders to exclude during file size checks. Example: --ignore-folders venv node_modules.
--ignore-files Specify files to exclude during file size checks. Example: --ignore-files large_file.txt.
--list-languages List all supported programming languages and exit.

Examples

  1. Generate a .gitignore for Python and Node.js:

    gitignore_maker --languages Python Node
    
  2. Add files larger than 10 MB to .gitignore:

    gitignore_maker --size-limit 10485760
    
  3. Ignore specific folders during size checks:

    gitignore_maker --ignore-folders venv build
    
  4. List all supported programming languages:

    gitignore_maker --list-languages
    

Example Workflow

Here i s a typical workflow using this tool:

  1. Generate a language-specific .gitignore file:

    gitignore_maker --languages Python Node
    

    This will create or update the .gitignore file with content for Python and Node.js.

  2. Filter large files: After generating the .gitignore, you may want to exclude files larger than 50 MB:

    gitignore_maker --size-limit 52428800
    

    This will scan the project directory and add all files larger than 50 MB to the .gitignore.

  3. Customize exclusion: To exclude certain folders like venv or build from being added to .gitignore, you can run:

    gitignore_maker --ignore-folders venv build
    

Supported Languages

This tool supports .gitignore templates for various programming languages, including but not limited to:

  • Python
  • Node.js
  • Java
  • Ruby
  • Go
  • PHP
  • C++
  • ...and more.

To see the full list of supported languages, use the --list-languages option:

gitignore_maker --list-languages

License

This project is licensed under the MIT License - see the LICENSE file for details.

Metadata

Release files for gitignore-maker 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gitignore-maker 0.1.3
File Size Uploaded
gitignore_maker-0.1.3.tar.gz 52.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gitignore-maker 0.1.3
File Interpreter ABI Platform
gitignore_maker-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 132.5 kB

Release files / gitignore_maker-0.1.3.tar.gz

Download URL gitignore_maker-0.1.3.tar.gz
Size 52.3 kB
Tags Source
SHA-256 checksum
How to use checksums
59d45a8a5b15e8a30df4a28cb9997890a1a3c8127827bba76fb1e0e9466cda41
BLAKE2b-256 checksum
How to use checksums
d11527f58b47c6d667b947a31bd919ba1101f41cae3b22ba839f715a44c6550d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.5

Release files / gitignore_maker-0.1.3-py3-none-any.whl

Download URL gitignore_maker-0.1.3-py3-none-any.whl
Size 80.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d38df57c08ae3192c94d26311a966b4a2887488e2fbf983dc0dff34a7375589c
BLAKE2b-256 checksum
How to use checksums
1bd42072e5d5aab56f58acc23365fa19318ca8fc7622c551139bfcb3bbdedc0a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.5

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page