Git Product home page Git Product logo

ignoreit's Introduction

ignoreit Declarative .gitignore

Build Status Go Report Card codecov

ignoreit is a utility to produce declarative .gitignore specifications that can be used to generate actual .gitignore files. In fact, this .gitignore was produced like this:

ignoreit add Go
ignoreit generate

The first command produces a schema .ignoreit.yml that abstracts the details of a set of .gitignore patterns into a human readable specification. It takes this form:

sources:
- repo: github/gitignore
  branch: master
  entries:
  - Go
- repo: whoshuu/gitignore
  branch: develop
  entries:
  - C++
  - Python 
custom:
- .custompattern
- .anothercustompattern
schema_version: 1

The second command takes this specification and generates a corresponding .gitignore file from it.

Both files should be checked into source control. Only the first should be manually edited via ignoreit, and the second is simply an artifact of changing the schema.

Install

You can install the ignoreit binary like how you would install any Go program:

go get github.com/whoshuu/ignoreit

Since the dependencies are vendored, this should pull in a single package and binary in your ${GOPATH}/bin called ignoreit.

Commands

In addition to ignoreit add and ignoreit generate, there is ignoreit remove. This will remove the patterns specified in the argument.

Both add and remove take an arbitrary number of arguments, so multiple entries can be specified at once:

ignoreit add Go CMake C++ Python
ignoreit remove CMake C++

These commands take --repo and --branch flags for specifying the source repository and branch to use for pulling down .gitignore entries. By default these are github/gitignore and master respectively.

Finally, ignoreit generate should be run any time changes are made to .ignoreit.yml. This command takes no arguments and simply inflates the specification into an appropriate .gitignore.

ignoreit's People

Contributors

whoshuu avatar

Stargazers

Alexander Böhn avatar

Watchers

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