Skip to content

A PHP console app to create and manage .gitignore files from Gitignore.io. Easily specify patterns, save to your project, and integrate with Git. Features include interactive pattern selection, quiet mode for non-interactive use, and directory validation.

Notifications You must be signed in to change notification settings

shahmal1yev/ignore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gitignore Generator Console Application

GitHub tag (latest by date) License: MIT GitHub last commit GitHub issues GitHub stars GitHub forks GitHub contributors

This console application provides commands to create .gitignore files by retrieving content from Gitignore.io based on selected patterns.

Features

  • List available gitignore patterns.
  • Create a .gitignore file based on selected patterns.
  • Save the generated .gitignore file to a specified path.

Installation

  1. Clone the repository:

    git clone <repository_url>
  2. Navigate to the project directory:

    cd <repository_name>
  3. Install dependencies using Composer:

    composer install

Integration with Git

  • Clone the repository.
  • Run composer install in the local repo directory.
  • Create a symlink: sudo ln -s <local-repo-absolute-path/bin/console> /usr/local/bin/git-ignore
  • Verify that it works: git ignore

Usage

List Available Patterns

To list available gitignore patterns, run:

php bin/console patterns

To create a .gitignore file based on selected patterns, run:

php bin/console create --path ./

To create a .gitignore file based on passed patterns, run:

php bin/console create --patterns composer --patterns phpstorm+all --path ./

Commands

  • ignore-patterns: Fetches and displays the available gitignore patterns from Gitignore.io.
  • create-gitignore: Creates a .gitignore file based on the selected patterns and optionally saves it to a specified path.

Aliases

  • ignore-patterns: patterns
  • create-gitignore: create

Options

  • create-gitignore:
    • --path|-pt: Path to save the generated .gitignore file. If not specified, the file will not be saved.
    • --patterns|-p: Patterns to retrieve from gitignore.io. This option can be specified multiple times.
  • quiet|-q: Run the command in quiet mode.

About

A PHP console app to create and manage .gitignore files from Gitignore.io. Easily specify patterns, save to your project, and integrate with Git. Features include interactive pattern selection, quiet mode for non-interactive use, and directory validation.

Topics

Resources

Stars

Watchers

Forks

Languages