At work we use git as source control. In one folder, there is a script I use very often, but there are several other scripts in the folder that are very similarly named that I never use. These other scripts make it difficult for me to tab-complete the name of my script when I want to run it, making it a minor annoyance every time I run this script.
I was hoping that I could put the names of the other scripts in my global .gitignore file, then delete them, but git still recognized that I had removed them, and wants me to commit this change.
In order to solve the problem, I have just created a bash alias for my script name, but it still leaves me curious whether the problem could have been solved another way. Is it possible for me to remove a file from my local git repository without having git complain?
Answering “No” is acceptable. I just am not sure whether I failed because it isn’t possible, or because my git fu is not strong enough.
Try
git-update-index --assume-unchanged path/to/ignored/file. That will keep git from checking that file for changes in your local working tree, but not affect any remote repositories.