いらんファイル/フォルダをcommitしちゃった。消したい
$ git rm --cached foo.txt $ echo 'foo.txt' > .gitignore $ git add .gitignore $ git commit -m 'delete and add .gitignore'
$ git rm --cached foo.txt $ echo 'foo.txt' > .gitignore $ git add .gitignore $ git commit -m 'delete and add .gitignore'