Skip to main content
replaced http://superuser.com/ with https://superuser.com/
Source Link
URL Rewriter Bot
URL Rewriter Bot

Rachel Duncan's answer got me set in the right direction, and I've found a solution that works! I also borrowed tips from http://superuser.com/questions/401614/inserting-string-from-xargs-into-another-stringhttps://superuser.com/questions/401614/inserting-string-from-xargs-into-another-string

git ls-files -i --exclude-from=.gitignore | tr '\n' '\0' | xargs -0 -L1 -I '$' git rm --cached '$' 

The above script compiles a list of all of your versioned git files that now fall within the .gitignore rules of exclusion, wraps quotes around each std line out (file path), then executes the git rm --cached command with the modified string.

I like this way because the terminal puts out a confirmation for each of the files it's removing from source control.

Cheers!

Rachel Duncan's answer got me set in the right direction, and I've found a solution that works! I also borrowed tips from http://superuser.com/questions/401614/inserting-string-from-xargs-into-another-string

git ls-files -i --exclude-from=.gitignore | tr '\n' '\0' | xargs -0 -L1 -I '$' git rm --cached '$' 

The above script compiles a list of all of your versioned git files that now fall within the .gitignore rules of exclusion, wraps quotes around each std line out (file path), then executes the git rm --cached command with the modified string.

I like this way because the terminal puts out a confirmation for each of the files it's removing from source control.

Cheers!

Rachel Duncan's answer got me set in the right direction, and I've found a solution that works! I also borrowed tips from https://superuser.com/questions/401614/inserting-string-from-xargs-into-another-string

git ls-files -i --exclude-from=.gitignore | tr '\n' '\0' | xargs -0 -L1 -I '$' git rm --cached '$' 

The above script compiles a list of all of your versioned git files that now fall within the .gitignore rules of exclusion, wraps quotes around each std line out (file path), then executes the git rm --cached command with the modified string.

I like this way because the terminal puts out a confirmation for each of the files it's removing from source control.

Cheers!

added 107 characters in body
Source Link
Sean Novak
  • 520
  • 3
  • 14

Rachel Duncan's answer got me set in the right direction, and I've found a solution that works! I also borrowed tips from http://superuser.com/questions/401614/inserting-string-from-xargs-into-another-string

git ls-files -i --exclude-from=.gitignore | tr '\n' '\0' | xargs -0 -L1 -I '$' git rm --cached '$' 

The above script compiles a list of all of your versioned git files that now fall within the .gitignore rules of exclusion, wraps quotes around each std line out (file path), then executes a the git rm --cached command with the modified string.

I like this way because the terminal puts out a confirmation for each of the files it's removing from source control.

Cheers!

Rachel Duncan's answer got me set in the right direction, and I've found a solution that works! I also borrowed tips from http://superuser.com/questions/401614/inserting-string-from-xargs-into-another-string

git ls-files -i --exclude-from=.gitignore | tr '\n' '\0' | xargs -0 -L1 -I '$' git rm --cached '$' 

The above wraps quotes around each std line out, then executes a the git rm --cached command with the modified string.

Cheers!

Rachel Duncan's answer got me set in the right direction, and I've found a solution that works! I also borrowed tips from http://superuser.com/questions/401614/inserting-string-from-xargs-into-another-string

git ls-files -i --exclude-from=.gitignore | tr '\n' '\0' | xargs -0 -L1 -I '$' git rm --cached '$' 

The above script compiles a list of all of your versioned git files that now fall within the .gitignore rules of exclusion, wraps quotes around each std line out (file path), then executes the git rm --cached command with the modified string.

I like this way because the terminal puts out a confirmation for each of the files it's removing from source control.

Cheers!

added 107 characters in body
Source Link
Sean Novak
  • 520
  • 3
  • 14

The aboveRachel Duncan's answer got me set in the right direction, and I've found somethinga solution that mostly works! I also borrowed tips from http://superuser.com/questions/401614/inserting-string-from-xargs-into-another-string

git ls-files -i --exclude-from=.gitignore | tr '\n' '\0' | xargs -0 -L1 -I '$' git rm --cached '$' 

The above wraps quotes around each std line out, then executes a the git rm --cached command with the modified string.

Cheers!

The above answer got me set in the right direction, and I've found something that mostly works!

git ls-files -i --exclude-from=.gitignore | tr '\n' '\0' | xargs -0 -L1 -I '$' git rm --cached '$' 

The above wraps quotes around each std line out, then executes a the git rm --cached command with the modified string.

Cheers!

Rachel Duncan's answer got me set in the right direction, and I've found a solution that works! I also borrowed tips from http://superuser.com/questions/401614/inserting-string-from-xargs-into-another-string

git ls-files -i --exclude-from=.gitignore | tr '\n' '\0' | xargs -0 -L1 -I '$' git rm --cached '$' 

The above wraps quotes around each std line out, then executes a the git rm --cached command with the modified string.

Cheers!

Source Link
Sean Novak
  • 520
  • 3
  • 14
Loading