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

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 :: scp server to local 
Shell :: bash check for substring in string 
Shell :: httpd https 
Shell :: bash store file in array 
Shell :: grep nth line 
Shell :: git pull without checkout 
Shell :: ssh key pair github 
Shell :: IlluminateHttpExceptionsPostTooLargeException Ubuntu 
Shell :: upgrade bash version mac 
Shell :: zsh fzf plugin 
Shell :: ubuntu persistent root loggin 
Shell :: use find command to search file contents 
Shell :: whoami linux 
Shell :: zsh for loop 
Shell :: install node on ubuntu 
Shell :: gnutls_handshake() failed: An unexpected TLS packet was received. 
Shell :: move file from one directory to another sftp 
Shell :: erlang clear shell 
Shell :: sudo systemctl restart networking 
Shell :: is lubuntu better than ubuntu 
Shell :: rails scaffold 
Shell :: check ram in linux 
Shell :: using tar 
Shell :: wine ubuntu 
Shell :: install drush ubuntu 20.04 
Shell :: fix corrupted recycle bin 
Shell :: install office 365 in ubuntu 
Shell :: zoom gedit 
Shell :: kubernetes /bin/bash 
Shell :: enospc no space left on device 
ADD CONTENT
Topic
Content
Source link
Name
6+8 =