Giter Site home page Giter Site logo

git_ignoregenerator's Introduction

git ignoregenerator

ignoregenerator is a little bash script that extends git. The purpose of ignoregenerator is to generate content for .gitignore by using github's gitignore repo.

Install

Download git-ignoregenerator and put it in a folder that's included in your $PATH or make a new folder to put it in and include that path to you r $PATH.

NOTE: On first run it might be a bit slow because it will clone the gitignore repo.

Usage

Say you are writing a Go application on Windows using VIM, and you want .gitignore to ignore files related to these things that don't need to be part of your repo. Make a .ignore_generator like this.

Go
Global/Windows
Global/Vim

NOTE: "Global/" is neede because the Windows and Vim gitignore files are in the Global folder of the gitignore repo.

Then use git ignoregenerator update

Then it will add a section at the end of your .gitignore file that looks something like this:

##### GENERATED START #####

SomeFileToIgnore
[...]

##### GENERATED END #####

All it does is concatenating the files written in the .ignore_generator file and putting the content between those two comments.

You can run the command again as you add or remove files from the .ignore_generator, or after having run git ignoregenerator upgrade, to do the apply any changes.

The ignoregenerator try to leave the rest of the file alone. That means, that you can add files you want to .gitignore file outside of those comments, and they should be safe.

Update to newest gitignore repo

Run the following: git ignoregenerator upgrade

Possible issues

The gitignore files concatenated contain conflicting files.

Keeps re-adding new generated statements. If it does this, it's because it adds ##### GENERATED START ###### at the end of the line which contains a file name, makeing it unable to see that the generated section has started.

Disclaimer

If you are using this, you are using this at your own risk.

git_ignoregenerator's People

Contributors

onizuka89 avatar

Watchers

 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.