Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

remove files inside .gitignore files

# First solution
$ git rm -r --cached . # We remove
$ git add . # We stage
$ git commit -m "Clean up ignored files" # We commit



# Second solution : if you have a lot of files
# It's basicaly the first solution in one line
git rm --cached `git ls-files -i -c --exclude-from=.gitignore`

# If you are on Windows and the line above didn't work, try this one in Powershell
git ls-files -i -c --exclude-from=.gitignore | %{git rm --cached $_}
Comment

git remove all files from gitignore

git ls-files -i --exclude-from=.gitignore | %{git rm --cached $_}

// works with windows powershell
Comment

git remove all files in gitignore

git ls-files -i -z --exclude-from=.gitignore | xargs -0 git rm --cached
Comment

remove gitignore files

git ls-files --ignored --exclude-standard -z | xargs -0 git rm --cached
git commit -am "Remove ignored files"


// answer from: thSoft
Comment

delete gitignore files

git rm -r --cached . 
git add .
git commit -am "Drop ignored files"
Comment

PREVIOUS NEXT
Code Example
Shell :: ssh-keygen -t rsa 
Shell :: pulseaudio check if runnings 
Shell :: git remote using ssh 
Shell :: bin/magento command not found 
Shell :: chmod x command 
Shell :: mv all files in directory to parent 
Shell :: install pgadmin4 ubuntu 20.04 
Shell :: hw to login to git 
Shell :: ubuntu install composer 
Shell :: docker unused 
Shell :: what is difference between npm install and npm install save --dev 
Shell :: test cpu linux 
Shell :: wsl2 file 
Shell :: do not install puppeteer 
Shell :: break line bash 
Shell :: download brew 
Shell :: ubuntu use pip as pip3 
Shell :: return to previous directory terminal 
Shell :: Sublime Text install Ubuntu/Debian 
Shell :: what service is listen on what port linux 
Shell :: install net tools in manjaro 
Shell :: stop nginx service 
Shell :: how to update code in github 
Shell :: how to install winehq in ubuntu?? 
Shell :: how to install prettier globally on mac 
Shell :: flask 
Shell :: grep lines after match 
Shell :: bash_aliases fedora 
Shell :: linux generate file of size 
Shell :: install tomcat on mac brew 
ADD CONTENT
Topic
Content
Source link
Name
9+5 =