When using Git as your Version control, when you don’t want some files to be tracked (e.g. runtime data, caches, runtime config), you need to add them to the gitignore file. There’s some list of files needed to be ignored which is common to all projects using a certain CMS/Framework, those are called Boilerplates code. After some time, you’ll find that editing .gitignore config and to remember the last settings you used can be a headache. Luckily there’s some nice people collected those settings for us, just search gitingore in the GitHub. Now you can even use gitignore-boilerplates command line tools to generate one for you.
How to use gitignore-boilerplates
Here is an example on how to bootstrap a WordPress project with gitignore-boilerplates
1 2 3 4 | $ cd my-WP-proj $ gibo WordPress SublimeText OSX >> .gitignore $ git init $ git add . && git commit -m "Initial Commit" |
So the format is basically gibo [boilerplate boilerplate…]. You add arbitary any number of boilerplates in the command. (I also use SublimeText and Mac, so I added those). You can run gibo -l to see the list of supported items.
More Examples:
1 2 3 | $ gibo Android Eclipse Linux Windows OSX >> .gitignore $ gibo CodeIgniter TextMate OSX >> .gitignore $ gibo Node SublimeText Linux >> .gitignore |
Install with HomeBrew on OSX
1 | $ brew install gibo |
Install on Linux
1 2 3 4 | $ cd ~ $ git clone https://github.com/simonwhitaker/gitignore-boilerplates.git $ cd gitignore-boilerplates $ mv ./gibo /usr/local/bin/ |