みなさん、.gitignore
をいつもどうしてますか?
もし、毎回以前のプロジェクトからコピーしていたり、手作業で1つずつ書いているのであれば今回の記事は役立つでしょう。
これからはgiboを使えば面倒な作業が減ります。
早速使い方を説明します。
giboをインストール
Mac
Homebrewでインストールします
$ brew install gibo
Windows
scoopでインストールします
$ scoop update
$ scoop install gibo
git cloneなどでのやり方は公式サイトを参照してください。
giboのアップデート
テンプレートは自動更新してくれないので手動で更新します。
# mac
$ brew upgrade gibo
# windows
$ scoop update
$ scoop update gibo
使い方
$ gibo Node >> .gitignore
例えばNode.js関係を.gitignore
に記述する場合は上記のように書きます。
上書きではないので複数でも問題ないです。
参考までにNode.jsの場合は下記が書き込まれます。
$ gibo Node
### https://raw.github.com/github/gitignore/be1d0e0a4cd9734c5c9541413eb1d777fbb74c6e/Node.gitignore
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
# nyc test coverage
.nyc_output
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules/
jspm_packages/
# TypeScript v1 declaration files
typings/
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variables file
.env
# next.js build output
.next
対応している言語等
gibo -l
と叩くと対応言語などを表示できます。
$ gibo -l
=== Languages ===
Actionscript DM Java OpenCart SeamGen
Ada Drupal Jboss OracleForms SketchUp
Agda Eagle Jekyll Packer Smalltalk
Android Elisp Joomla Perl Stella
AppceleratorTitanium Elixir Julia Phalcon SugarCRM
AppEngine Elm KiCad PlayFramework Swift
ArchLinuxPackages EPiServer Kohana Plone Symfony
Autotools Erlang Kotlin Prestashop SymphonyCMS
C++ ExpressionEngine LabVIEW Processing Terraform
C ExtJs Laravel PureScript TeX
CakePHP Fancy Leiningen Python Textpattern
CFWheels Finale LemonStand Qooxdoo TurboGears2
ChefCookbook ForceDotCom Lilypond Qt Typo3
Clojure Fortran Lithium R Umbraco
CMake FuelPHP Lua Rails Unity
CodeIgniter Gcov Magento RhodesRhomobile UnrealEngine
CommonLisp GitBook Maven ROS VisualStudio
Composer Go Mercury Ruby VVVV
Concrete5 Godot MetaProgrammingSystem Rust Waf
Coq Gradle Nanoc Sass WordPress
CraftCMS Grails Nim Scala Xojo
CUDA GWT Node Scheme Yeoman
D Haskell Objective-C SCons Yii
Dart Idris OCaml Scrivener ZendFramework
Delphi IGORPro Opa Sdcc Zephir
=== Global ===
Anjuta Eclipse Lazarus Ninja TextMate
Ansible EiffelStudio LibreOffice NotepadPP TortoiseGit
Archives Emacs Linux Otto Vagrant
Bazaar Ensime LyX Redcar Vim
BricxCC Espresso macOS Redis VirtualEnv
Calabash FlexBuilder Matlab SBT VisualStudioCode
Cloud9 GPG Mercurial SlickEdit WebMethods
CodeKit JDeveloper MicrosoftOffice Stata Windows
CVS JEnv ModelSim SublimeText Xcode
DartEditor JetBrains Momentics SVN XilinxISE
Dreamweaver Kate MonoDevelop SynopsysVCS
Dropbox KDevelop4 NetBeans Tags
結構な数があります。
大体はこれでなんとかなりますね。
もし、今まで手作業でポチポチやっていた人は是非使うとよいですよ。
公式サイト:gibo