How would I create a script that would take a list of file names in a git repository (I was planning on using a .txt file with one file name on each line, but I am open to other suggestions) as an input, and then remove those specified files from the repository?
I was thinking about using the 'cat' command and a pipe, so that in the terminal the commands would look something like this:
cd my-git-repo cat fileNames.txt | myShellScript.sh git push origin master
And then 'myShellScript.sh' would be:
#!/bin/bash git rm $0 git add . git commit -m "removed unused file"
Also I know there should be some type of 'read' command to read fileNames.txt line by line.