GIT에서 ignore에 있는 화일 삭제 하기..

git rm --cached `git ls-files -i --exclude-from=.gitignore`
git commit -m 'Removed all files that are in the .gitignore'
git push origin master


이러면 .ignore 화일에 존재 하는 화일을 레파지토리에서 다 지워 준다.


git ls-files -i --exclude-from=.gitignore > to_remove.txt
while read line; do `git rm -r --cached "$line"`; done < to_remove.txt
rm to_remove.txt
git commit -m 'Removed all files that are in the .gitignore'
git push origin master

이것도...