どちらかというと個人的メモ。 現象 .gitignoreを作成する前にnpm installをしてしまい、git add .でnode_modules以下を全てインデックスに登録してしまった。 やりたいこと インデックスからnode_modules以下を全て消したい。 手順 まずはミスってしまった経緯 $ git add . $ git status On branch master Initial commit Changes to be committed: (use "git rm --cached <file>..." to unstage) new file: .gitignore new file: app.js new file: index.jade new file: node_modules/.bin/jade new file: node_modules/expres