#For a single file: git rm --cached mylogfile.log #For a single directory: git rm --cached -r mydirectory