janez-svetin
10/13/2015 - 10:36 PM

Nobody is perfect and sometimes you need to add some folders or files to .gitignore, but they are already pushed to repo. These lines will r

Nobody is perfect and sometimes you need to add some folders or files to .gitignore, but they are already pushed to repo. These lines will remove all files from cache and will only add valid files. (http://www.marco-bunge.com/2015/10/12/git-remove-ignored-files/?utm_source=SitePoint&utm_medium=email&utm_campaign=Versioning)

git rm -r --cached . 
git add .
git commit -m "Removed all ignored folders and files"
git push origin master